Learn R Programming

cudaBayesreg (version 0.3-16)

post.ppm: Posterior Probability Map (PPM) image

Description

post.ppm computes the PPM image of voxel activations in a slice.

Usage

post.ppm(out, slicedata, ymaskdata, vreg=2, swap=FALSE, plot=TRUE, col=heat.colors(256))

Arguments

out
output of MCMC simulation
slicedata
list(slice=slice, niislicets=niislicets, mask=mask, dsgn=dsgn); input slice data used in simulation as returned by read.fmrislice
ymaskdata
list(yn = yn, kin = kin, nreg = nreg); masked and standardised slice data as returned by premask
vreg
regression variable to represent in PPM; default(vreg=2)
swap
image in radiological convention (default=FALSE)
plot
show ppm images (with overlay) ?: (default=TRUE)
col
a list of colors such as that generated by "heat.colors", "gray" or similar functions.

Value

a list containing
ppm
ppm image as matrix
nactive
n. of active voxels

Details

Use the MCMC draws to estimate the Posterior Probability Map (PPM) image. The number of regression variables used in the simulation is equal to the number of columns specified in the design matrix, plus an intercept term; vreg=1 represents the intercept term in regression.

References

Adelino Ferreira da Silva (2011). ``A Bayesian Multilevel Model for fMRI Data Analysis.'', Computer Methods and Programs in Biomedicine, 102,(3), 238--252.

See Also

cudaMultireg.slice, regpostsim, post.simul.hist, post.tseries

Examples

Run this code
## Not run: 
# slicedata <- read.fmrislice(fbase="fmri", slice=3, swap=FALSE)
# ymaskdata <- premask(slicedata)
# fsave <- paste(tempdir(),"/simultest1",fileext = ".sav", sep="")
# answ <- readline("Run MCMC simulation first ? ")
# run <- FALSE
# if (substr(answ, 1, 1) == "y") { run <- TRUE }
# if(run) {
# 	out <- cudaMultireg.slice(slicedata, ymaskdata, R=2000, keep=5,
#     nu.e=3, zprior=FALSE)
# } else {
# 	load(file=fsave)
# 	cat("loaded",fsave,"\n")
# }
# post.ppm(out=out, slicedata=slicedata, ymaskdata=ymaskdata, vreg=2)
# post.ppm(out=out, slicedata=slicedata, ymaskdata=ymaskdata, vreg=4)
# ## End(Not run)

Run the code above in your browser using DataLab