summary.metropolis.samples {metropolis} | R Documentation |
Summarize a probability distribution from a Markov Chain
Description
This function allows you to summarize output from the metropolis function.
Usage
## S3 method for class 'metropolis.samples'
summary(object, keepburn = FALSE, ...)
Arguments
object |
an object from the function "metropolis" |
keepburn |
keep the burnin iterations in calculations (if adapt=TRUE, keepburn=TRUE will yield potentially invalid summaries) |
... |
not used |
Details
TBA
Value
returns a list with the following fields: nsamples: number of simulated samples sd: standard deviation of parameter distributions se: standard deviation of parameter distribution means ESS_parms: effective sample size of parameter distribution means postmean: posterior means and normal based 95% credible intervals postmedian: posterior medians and percentile based 95% credible intervals postmode: posterior modes and highest posterior density based 95% credible intervals
Examples
dat = data.frame(y = rbinom(100, 1, 0.5), x1=runif(100), x2 = runif(100))
res = metropolis_glm(y ~ x1 + x2, data=dat, family=binomial(), iter=10000, burnin=3000,
adapt=TRUE, guided=TRUE, block=FALSE)
summary(res)
[Package metropolis version 0.1.8 Index]