summary.mcmc_output {bssm} | R Documentation |
Summary Statistics of Posterior Samples
Description
This functions returns a data frame containing mean, standard deviations, standard errors, and effective sample size estimates for parameters and states.
Usage
## S3 method for class 'mcmc_output'
summary(
object,
return_se = FALSE,
variable = "theta",
probs = c(0.025, 0.975),
times,
states,
use_times = TRUE,
method = "sokal",
...
)
Arguments
object |
Output from |
return_se |
if |
variable |
Are the summary statistics computed for either
|
probs |
A numeric vector defining the quantiles of interest. Default is
|
times |
A vector of indices. For states, for what time points the
summaries should be computed? Default is all, ignored if
|
states |
A vector of indices. For what states the summaries should be
computed?. Default is all, ignored if
|
use_times |
If |
method |
Method for computing integrated autocorrelation time. Default
is |
... |
Ignored. |
Details
For IS-MCMC two types of standard errors are reported. SE-IS can be regarded as the square root of independent IS variance, whereas SE corresponds to the square root of total asymptotic variance (see Remark 3 of Vihola et al. (2020)).
Value
If variable
is "theta"
or "states"
, a
data.frame
object. If "both"
, a list of two data frames.
References
Vihola, M, Helske, J, Franks, J. Importance sampling type estimators based on approximate marginal Markov chain Monte Carlo. Scand J Statist. 2020; 1-38. https://doi.org/10.1111/sjos.12492
Examples
data("negbin_model")
summary(negbin_model, return_se = TRUE, method = "geyer")
summary(negbin_model, times = c(1, 200), prob = c(0.05, 0.5, 0.95))