pmeans.hcoef: Posterior mean for each regression variable

Description Usage Arguments Details Value See Also Examples

View source: R/pmeans.hcoef.R

Description

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

Usage

1
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

Details

Post-process MCMC simulation

Value

pmeans

Posterior Means of Coefficients

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## 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)

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