Learn R Programming

cudaBayesreg (version 0.3-6)

post.randeff: Plots of the random effects distribution

Description

Computes 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)

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

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 Ferreira da Silva, A Bayesian Multilevel Model for fMRI Data Analysis, Computer Methods and Programs in Biomedicine, to be published.

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 <- "/tmp/simultest3.sav"
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