Learn R Programming

cudaBayesreg (version 0.2-1)

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

  • pmeansPosterior Means of Coefficients

concept

  • MCMC
  • hierarchical model

Details

Post-process MCMC simulation

See Also

cudaMultireg.slice read.fmrisample regpostsim post.simul.betadraw post.simul.hist

Examples

Run this code
slicedata <- read.fmrisample(slice=3)
fsave <- "/tmp/simultest.sav"
answ <- readline("Run MCMC simulation first ? ")
run <- FALSE
if (substr(answ, 1, 1) == "y") { run <- TRUE }
if(run) {
	out <- cudaMultireg.slice(slicedata, fsave=fsave )
} else {
	load(file=fsave)
	cat("loaded",fsave,"\n")
}
pmeans <- pmeans.hcoef(out$betadraw)

Run the code above in your browser using DataLab