mcmc_sum: MCMC_sum: A custom function for summarizing MCMC posterior sampling
Description
MCMC_sum: A custom function for summarizing MCMC posterior sampling
Usage
mcmc_sum(out, thin = 1, truth)
Value
A dataframe object summarizing the MCMC draws, including diagnostics,
quantiles and posterior means.
Arguments
out
Draws from a model fit using a probabilistic programming language
(e.g., Stan, NIMBLE or JAGS). The expected format of this input is a list,
where each entry is a Markov chain.
thin
An optional thinning interval.
truth
A vector with the true parameter values organized alphanumerically
by parameter value (e.g., lambda\[1\], lambda\[2\], psi\[1\], psi\[2\], theta\[1,1\],
theta\[1,2\], theta\[2,1\], theta\[2,2\])
# An example fit of one datasetdraws <- ValExp_example_fit
# The data generating valuestruth <- c(11,2,0.3, 0.6, 0.9, 0.15, 0.10, 0.85)
mcmc_sum(draws, truth = truth)