summary.stationary | R Documentation |
Summary for a sample of posterior model probabilities (stationary
).
Also provides the estimated effective sample size and summaries for all pairwise Bayes factors.
## S3 method for class 'stationary'
summary(object, BF = FALSE, logBF = FALSE, ...)
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 |
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).
a list with estimates for
"pp"
= posterior model probabilities,
"n.eff"
= effective sample size, and
"bf"
= pairwise Bayes factors (optional)
stationary
, fit_dirichlet
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.