post.randeff: Plots of the random effects distribution

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/post.randeff.R

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

1
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 specification. If no class names are given (default) only the draws of the mean of the random effects distribution are plotted.

climits

logical variable (default = TRUE): if TRUE plots for the class draws use a commom ylim parameter.

Details

The statistical model allows for the analysis of random effects through the specification of the Z matrix in the prior,
beta_i ~ 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).

Author(s)

A. Ferreira da Silva, Universidade Nova de Lisboa, Faculdade de Ciencias e Tecnologia,
afs@fct.unl.pt.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
## 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"))

## End(Not run)

cudaBayesreg documentation built on May 29, 2017, 6:19 p.m.