Summarise parameter estimates and model diagnostics.
# S3 method for mcpfit summary(object, width = 0.95, digits = 2, prior = FALSE, ...) fixef(object, width = 0.95, prior = FALSE, ...) ranef(object, width = 0.95, prior = FALSE, ...) # S3 method for mcpfit print(x, ...)
Float. The width of the highest posterior density interval (between 0 and 1).
a non-null value for digits specifies the minimum number of significant digits to be printed in values. The default, NULL, uses getOption("digits"). (For the interpretation for complex numbers see signif.) Non-integer values will be rounded down, and only values greater than or equal to 1 and no greater than 22 are accepted.
TRUE/FALSE. Summarise prior instead of posterior?
A data frame with parameter estimates and MCMC diagnostics.
OBS: The change point distributions are often not unimodal and symmetric so
the intervals can be deceiving Plot them using
mean is the posterior mean
lower is the lower quantile of the highest-density interval (HDI) given in
upper is the upper quantile.
Rhat is the Gelman-Rubin convergence diagnostic which is often taken to
be acceptable if < 1.1. It is computed using
n.eff is the effective sample size computed using
Low effective sample sizes are also obvious as poor mixing in trace plots
plot_pars(fit)). Read how to deal with such problems here
ts_err is the time-series error, taking autoregressive correlation
into account. It is computed using
For simulated data, the summary contains two additional columns so that it is easy to inspect whether the model can recover the parameters. Run simulation and summary multiple times to get a sense of the robustness.
sim is the value used to generate the data.
sim is contained in the HDI interval (
fixef: Get population-level ("fixed") effects of an
ranef: Get varying ("random") effects of an
print.mcpfit: Print the posterior summary of an
# Typical usage summary(ex_fit) summary(ex_fit, width = 0.8, digits = 4) # Set HDI width # Get the results as a data frame results = summary(ex_fit) # Varying (random) effects # ranef(my_fit) # Summarise prior summary(ex_fit, prior = TRUE)