R: Spatial Modeling by a Bayesian Hierarchical Linear...
spatail.lme.mcmc
R Documentation
Spatial Modeling by a Bayesian Hierarchical
Linear Mixed-effects Model
Description
A linear mixed-effects model that combines unstructured
variance/covariance matrix for
inter-regional (long-range) correlations and
an exchangeable correlation structure for intra-regional (short-range)
correlations. Estimation is performed using the Gibbs sampling.
a matrix of observations with one subject per column
and one location per row. For each subject, the observations
are arranged one location after another.
nlr
a vector of number of locations within each region. One
component per region.
nsweep
the number of iterations.
verbose
logical. If TRUE, then indicate
the level of output after every 1000 iterations.
The default is TRUE.
Details
The function was proposed to study the fMRI data.
The original MATLAB code written by DuBois Bowman and Brian Caffo can
be found at: http://www.biostat.jhsph.edu/~bcaffo/downloads/clusterBayes.m.
Instead of stacking the data from
two conditions, the R version fits the model for one condition and
the user needs to use the function multiple times for separate conditions.
The initial values are obtained based on sample moments. The
hyper-parameters for the prior distributions of the intra-regional
variances and variances of locations' means are set up in the way that
the mean is equal to the sample mean and the variance is large.
Value
mu.save
a matrix of means at every location. One column per iteration.
sigma2.save
a matrix of intra-regional variances. One column
per iteration.
lambda2.save
a matrix of variances of locations' means within regions. One column per iteration.
Gamma.save
a matrix of inter-regional variance/covariance
matrix. One column per iteration and within each column the
elements of the variance/covariance matrix are arranged column-wise.
Note
There seemed to be no easy way to use lmer or
lme to fit
the variance/covariance structure in this model and SAS proc
mixed failed for certain cases.
References
Brian Caffo, DuBois Bowman, Lynn Eberly and Susan Spear Bassett (2009)
A Markov Chain Monte Carlo Based Analysis of a
Multilevel Model for Functional MRI Data
Handbook of Markov Chain Monte Carlo
F. DuBois Bowman, Brian Caffo, Susan Spear Bassett, and Clinton Kilts (2008)
A Bayesian Hierarchical Framework for Spatial Modeling of fMRI
Data
Neuroimagevol. 39, no. 1 146-156