Description Usage Arguments Details See Also Examples
regpostsim
estimates voxel activation and plots the posterior distribution of a regression coefficient.
1 | regpostsim(pmeans, vreg, plot=T)
|
pmeans |
Posterior Means of Coefficients as processed by pmeans.hcoef() |
vreg |
regression variable to process |
plot |
plot the histogram, (default=T) |
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
cudaMultireg.slice
,
pmeans.hcoef
,
plot.hcoef.post
,
post.simul.hist
,
post.simul.betadraw
,
post.ppm
,
post.tseries
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.