Learn R Programming

spBayes (version 0.0-2)

prior: Creates prior distribution definitions

Description

The function prior creates a valid prior definition for use in ggt.sp.

Usage

prior(dist, ...)

Arguments

dist
a quoted key word that identifies the prior distribution. The choices are inverse-gamma "IG", uniform "UNIF", log-uniform, "LOGUNIF", half-Cauchy "HC", normal "NORMAL", flat
...
the hyperparameters of the chosen prior distribution, passed as quoted key words with associated values. See details below.

Value

  • priora list object of class ggt.prior which is used for the value portion of the prior tag in the ggt.sp function.

code

ggt.sp

Details

Up to a proportionality constant the possible priors are:
  • Uniform:
{$1/(b-a), b > a$, where $b > a$. Use key words "a", and "b". } Log-uniform:{$1/(b-a), b > a$, where $b > a > 0$. When the associated parameter is known to be strictly greater than zero, the log-uniform should be used to improve sampler efficiency. Use key words "a", and "b". } Inverse-gamma:{$x^{-(a+1)} exp(-b/x)$, where $a$ is shape $> 0$ and $b$ is scale $> 0$. Use key words "shape", and "scale". } Half-Cauchy:{$(x^2 + a^2)^{-1}$. Use key word "a". } Normal:{$exp(-1/2 (\beta - mu)^t V^{-1} (\beta - mu))$, where $mu$ is the mean vector of length $p$ and $V^{-1}$ is the $p \times p$ precision matrix. Use key words "mu" and "precision". }

Inverse-Wishart:{$det(S)^{df/2}det(W)^{-(df+m+1)/2}exp(-1/2 tr(SW^{-1}))$, where $W$ is the $m \times m$ covariance matrix, $df$ is the degrees of freedom, and $S$ is the positive definite $m \times m$ scale matrix. Use key words "df" and "S". }

References

Banerjee, S., Carlin, B.P., and Gelfand, A.E. (2004). Hierarchical modeling and analysis for spatial data. Chapman and Hall/CRC Press, Boca Raton, Fla.

Gelman, A. (2006). Prior distributions for variance parameters in hierarchical models 1(3):515-533, Bayesian Analysis. Further information on the package spBayes can be found at: http://blue.fr.umn.edu/spatialBayes.

See Also

ggt.sp