summary.stationary {MCMCprecision} | R 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 |
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
\sum\alpha[i]
minus the prior sample size \epsilon*M^2
(where M
is the number of sampled models and \epsilon
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
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)