summary.mcmc: Summarize posterior draws

summary.MCMCR Documentation

Summarize posterior draws

Description

summary.MCMC is an S3 method to summarize posterior draws of the model. The input should be a matrix of draws.

Usage

## S3 method for class 'MCMC'
summary(object,names,burnin=trunc(.1*nrow(X)),quantiles=FALSE,trailer=TRUE,...)

Arguments

object

object is a matrix of draws, usually an object of class MCMC. It's same as X.

names

an optional character vector of names for the columns of X.

burnin

number of draws to burn-in (default value is 0.1*nrow(X)).

quantiles

logical for should quantiles be displayed (def: FALSE).

trailer

logical for should a trailer be displayed (def: TRUE).

...

optional arguments for generic function.

Details

This function is modified from package bayesm by Peter Rossi. It summarize object MCMC. Mean, Std Dev, effective sample size (computed by function effectiveSize in package coda) are displayed. If quantiles=TRUE, quantiles of marginal distirbutions in the columns of X are displayed.

The function also returns significance level, defined by whether the symmetric posterior quantile-based credible interval excludes zero. For example, a regression coefficient with one * has 0.025 quantile and 0.975 quantile with the same sign. Similarly, '***' denotes 0.0005 and 0.9995, '**' denotes 0.005 and 0.995, '*' denotes 0.025 and 0.975, '.' denotes 0.05 and 0.95 quantiles with the same sign.

Author(s)

Peter Rossi, Anderson School, UCLA, perossichi@gmail.com.

See Also

summary.bayeslm.fit

Examples

x = matrix(rnorm(1000), 100, 10)
y = x %*% rnorm(10) + rnorm(100)
fit=bayeslm(y~x)
summary(fit$beta)

bayeslm documentation built on June 28, 2022, 1:05 a.m.