slicedata <- read.fmrisample(slice=3)
fsave <- "/tmp/simultest.sav"
answ <- readline("Run MCMC simulation first ? ")
if (substr(answ, 1, 1) == "y") { run <- TRUE }
else { run <- FALSE }
if(run) {
out <- cudaMultireg.slice(slicedata, fsave=fsave )
} 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
Run the code above in your browser using DataLab