Learn R Programming

cudaBayesreg (version 0.3-16)

pmeans.hcoef: Posterior mean for each regression variable

Description

pmeans.hcoef processes the MCMC simulation to evaluate the posterior mean of the regression variables.

Usage

pmeans.hcoef(x,burnin=trunc(.1*R))

Arguments

x
betadraw object generated by the MCMC simulation
burnin
n. of draws to burnin, def: .1*R

Value

pmeans
Posterior Means of Coefficients

Details

Post-process MCMC simulation

See Also

cudaMultireg.slice, read.fmrislice, regpostsim, post.simul.betadraw, post.simul.hist

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)
# ## End(Not run)

Run the code above in your browser using DataLab