spatialgibbs | R Documentation |
This function fits a Normal hierarchical model with a spatial covariance structure via MCMC.
spatialgibbs( b, v, x, y, phi = 0.1, scale = 1, maxiter = 1000, burn = 500, a0 = 10, b0 = 1e+05 )
b |
a vector of regression coefficients |
v |
a vector of regression coefficient variances |
x |
a vector of x-coordinates |
y |
a vector of y-coordinates |
phi |
scale parameter for exponential covariance function |
scale |
scaling parameter for the prior variance of the national average estimate |
maxiter |
maximum number of iterations in the Gibbs sampler |
burn |
number of iterations to discard |
a0 |
parameter for Gamma prior on heterogeneity variance |
b0 |
parameter for Gamma prior on heterogeneity variance |
This function is used to produce pooled national average estimates of air pollution risks taking into account potential spatial correlation between the risks. The function uses a Markov chain Monte Carlo sampler to produce the posterior distribution of the national average estimate and the heterogeneity variance. See the reference below for more details.
Roger D. Peng rpeng@jhsph.edu
Peng RD, Dominic F (2008). Statistical Methods for Environmental Epidemiology in R: A Case Study in Air Pollution and Health, Springer.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.