spatialgibbs {tsModel} | R Documentation |
Fit Hierarchical Model with Spatial Covariance
Description
This function fits a Normal hierarchical model with a spatial covariance structure via MCMC.
Usage
spatialgibbs(b, v, x, y, phi = 0.1, scale = 1, maxiter = 1000,
burn = 500, a0 = 10, b0 = 100000)
Arguments
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 |
Details
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.
Author(s)
Roger D. Peng rpeng@jhsph.edu
References
Peng RD, Dominic F (2008). Statistical Methods for Environmental Epidemiology in R: A Case Study in Air Pollution and Health, Springer.