Learn R Programming

cudaBayesreg (version 0.3-13)

post.randeff: Plots of the random effects distribution

Description

Plots draws of the random effects distribution, following the specification of cross-sectional units (group information) in the Z matrix of the statistical model.

Usage

post.randeff(out, classnames=NULL, climits=TRUE)

Arguments

out
output of MCMC simulation
classnames
default=NULL; concatenation of unit (class member) names used in the Z matrix specification. The argument may be a subvector of all unit names, but the classnames given in the argument must match the order used in the Z matrix specif
climits
logical variable (default = TRUE): if TRUE plots for the class draws use a commom ylim parameter.

concept

  • random effects
  • postprocessing

Details

The statistical model allows for the analysis of random effects through the specification of the Z matrix in the prior, $beta_i$ $\sim$ N(ZDelta[i,],$V_{beta}$). The example included in the package (fbase="swrfM") defines a partition of the fMRI dataset in 3 classes, associated with 3 brain regions: CSF, gray matter and white matter (see examples).

References

Adelino R. Ferreira da Silva (2011). ``cudaBayesreg: Parallel Implementation of a Bayesian Multilevel Model for fMRI Data Analysis.'' Journal of Statistical Software, 44(4), 1--24. URL http://www.jstatsoft.org/v44/i04/. Adelino Ferreira da Silva (2011). ``A Bayesian Multilevel Model for fMRI Data Analysis.'', Computer Methods and Programs in Biomedicine, 102,(3), 238--252. Adelino Ferreira da Silva (2010). ``cudaBayesreg: Bayesian Computation in CUDA.'', The R Journal, 2/2, 48-55. URL http://journal.r-project.org/archive/2010-2/RJournal_2010-2_Ferreira~da~Silva.pdf.

See Also

cudaMultireg.slice, read.Zsegslice, read.fmrislice

Examples

Run this code
## Random effects simulation using the SPM auditory dataset "swrfM*"
fbase <- "swrfM"
slice <- 21
slicedata <- read.fmrislice(fbase=fbase, slice=slice)
ymaskdata <- premask(slicedata)
fsave <- paste(tempdir(),"/simultest3",fileext = ".sav", sep="")
out <- cudaMultireg.slice(slicedata, ymaskdata, R=2000, keep=5, nu.e=3,
  fsave=fsave, zprior=TRUE, rng=1)
## show random effects for 3 classes
post.randeff(out, classnames=c("CSF","GRY","WHT"))

Run the code above in your browser using DataLab