Description Usage Arguments Details Value Examples
Summarizes the results of the cline model by providing the posterior mean and median,
credible intervals, and diagnostics for the model parameters. To save computation time, this function uses the
memoise
package to save past results and avoid recalculations. To clear the cache
of saved results, use clear.cache = T or run the clear_bahz_cache
function.
1 2 | cline_summary(stanfit, prob = 0.95, method = "HPDI", show.all = F,
clear.cache = F)
|
stanfit |
A |
prob |
The probability interval to return. Default is .95. Numeric, between 0 and 1. |
method |
The method for calculating credible intervals. Either "ET" for equal-tail probability intervals, or "HPDI" for highest posterior density intervals. Default is "HPDI". |
show.all |
By default, function returns summaries only for the main cline parameters. Set show.all to T to see summaries for matrix and vector parameters. |
clear.cache |
Clear the cache of saved results to ensure recalculation of summary? TRUE or FALSE, default FALSE. |
Uses the rstan
summary method on class stanfit
objects
for calculating posterior means and medians, SEM, standard deviations, equal tail
probability intervals, and diagnostics. Uses the HPDinterval
function in
coda
to calculate HPDI intervals, the default.
A summary data frame with the columns:
param: The model parameter.
mean: The mean of the posterior distribution.
median: The median of the posterior distribution.
se_mean: The standard error of the mean of the posterior distribution.
sd: The standard deviation of the posterior distribution.
lower: The lower limit of the credible interval. The column name will include the probability value and method used for calculating the CI.
upper: The upper limit of the credible interval. The column name will include the probability value and method used for calculating the CI.
n_eff: The effective number of samples from the posterior distribution.
Rhat: The Gelman-Rubin convergence diagnostic. Should be 1, any other value is indicative of a problem during sampling.
1 2 3 4 | ## Not run:
cline_summary(stanfit)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.