summary.stationary: Summary for Posterior Model Probabilities

View source: R/summary.R

summary.stationaryR Documentation

Summary for Posterior Model Probabilities

Description

Summary for a sample of posterior model probabilities (stationary). Also provides the estimated effective sample size and summaries for all pairwise Bayes factors.

Usage

## S3 method for class 'stationary'
summary(object, BF = FALSE, logBF = FALSE, ...)

Arguments

object

posterior samples of the stationary distribution (rows = samples; columns = models).

BF

whether to compute summaries for all pairwise Bayes factors.

logBF

whether to summarize log Bayes factors instead of Bayes factors.

...

passed to fit_dirichlet to estimate effective sample size (e.g., maxit and abstol).

Details

Effective sample is estimated by fitting a Dirichlet model to the posterior model probabilities (thereby assuming that samples were drawn from an equivalent multinomial distribution based on independent sampling). More precisely, sample size is estimated by the sum of the Dirichlet parameters ∑α[i] minus the prior sample size ε*M^2 (where M is the number of sampled models and ε the prior parameter for each transition frequency).

Value

a list with estimates for "pp" = posterior model probabilities, "n.eff" = effective sample size, and "bf" = pairwise Bayes factors (optional)

See Also

stationary, fit_dirichlet

Examples

P <- matrix(c(.1,.5,.4,
              0, .5,.5,
              .9,.1,0), ncol = 3, byrow=TRUE)
z <- rmarkov(1000, P)
samples <- stationary(z, summary = FALSE)
summary(samples)


danheck/MCMCprecision documentation built on Nov. 13, 2022, 11:41 p.m.