posterior-moments: Get means or standard deviations of parameters from the MCMC...

posterior-momentsR Documentation

Get means or standard deviations of parameters from the MCMC output in an mcdraws object

Description

Get means or standard deviations of parameters from the MCMC output in an mcdraws object

Usage

get_means(obj, vnames = NULL)

get_sds(obj, vnames = NULL)

Arguments

obj

an object of class mcdraws.

vnames

optional character vector to select a subset of parameters.

Value

A list with simulation means or standard deviations.

Examples


ex <- mcmcsae_example(n=50)
sampler <- create_sampler(ex$model, data=ex$dat)
sim <- MCMCsim(sampler, burnin=100, n.iter=300, thin=2, n.chain=4)
get_means(sim)
get_means(sim, "e_")
sim <- MCMCsim(sampler, burnin=100, n.iter=300, thin=2, n.chain=4,
  store.mean=c("beta", "u"), store.sds=TRUE)
summary(sim, "beta")
get_means(sim, "beta")
get_sds(sim, "beta")
get_means(sim, "u")
get_sds(sim, "u")



mcmcsae documentation built on Oct. 11, 2023, 1:06 a.m.