cline_summary: Summarize cline model results

Description Usage Arguments Details Value Examples

Description

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.

Usage

1
2
cline_summary(stanfit, prob = 0.95, method = "HPDI", show.all = F,
  clear.cache = F)

Arguments

stanfit

A stanfit object holding your model results.

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.

Details

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.

Value

A summary data frame with the columns:

Examples

1
2
3
4
## Not run: 
cline_summary(stanfit)

## End(Not run)

tjthurman/BAHZ documentation built on May 30, 2020, 8:28 a.m.