post.ppm: Posterior Probability Map (PPM) image

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

View source: R/post.ppm.R

Description

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

Usage

1
2
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.

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.

Value

a list containing

ppm

ppm image as matrix

nactive

n. of active voxels

Author(s)

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

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## 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)

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