regpostsim: Estimation of voxel activations

Description Usage Arguments Details See Also Examples

View source: R/regpostsim.R

Description

regpostsim estimates voxel activation and plots the posterior distribution of a regression coefficient.

Usage

1
regpostsim(pmeans, vreg, plot=T)

Arguments

pmeans

Posterior Means of Coefficients as processed by pmeans.hcoef()

vreg

regression variable to process

plot

plot the histogram, (default=T)

Details

Estimate the active and non-active voxels based on the highest posterior density (HPD) of the coefficients simulated by the multilevel method. Plot the histogram of the posterior distribution of regression coefficient vreg

See Also

cudaMultireg.slice, pmeans.hcoef, plot.hcoef.post, post.simul.hist, post.simul.betadraw, post.ppm, post.tseries

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## 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,
   fsave=fsave, zprior=FALSE)
} else {
	load(file=fsave)
	cat("loaded",fsave,"\n")
}
##
pmeans <- pmeans.hcoef(out$betadraw) 
px <- regpostsim(pmeans, vreg=2)
pm2 <- pmeans[,vreg]
spma <- px$spma # active voxels
spmn <- px$spmn # non-active voxels

## End(Not run)

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