Learn R Programming

cudaBayesreg (version 0.3-16)

regpostsim: Estimation of voxel activations

Description

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

Usage

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

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,
#    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)

Run the code above in your browser using DataLab