Learn R Programming

spBayes (version 0.0-1)

prior: Creates prior distribution definitions for use in ggt and ggt.sp

Description

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

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", and normal "NORMAL".
...
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 and ggt.sp functions.

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". }

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. (2005). Prior distributions for variance parmaters in hierarchical models. 1(2):1-19, Bayesian Analysis. Further information on the package spBayes can be found at: http://blue.fr.umn.edu/spatialBayes.

See Also

ggt, ggt.sp