summarize_interval: Function to summarize a dataframe and produce confidence...

View source: R/results.r

summarize_intervalR Documentation

Function to summarize a dataframe and produce confidence intervals.

Description

This function summarizes predictions to create confidence intervals. This works for both the results of a bootstrap and the posterior distribution of a Bayesian analysis.

Usage

summarize_interval(
  data,
  .ci = 0.95,
  .hdi = T,
  .grouping = c(".prediction.id", "prob"),
  .round = 3
)

Arguments

data

Dataframe with variables to be summarized.

.ci

Confidence interval. Defaults to 95 percent, which is the 2.5th to the 97.5th percentile of the distribution.

.grouping

Variables that are excluded from the group and summarize. The variable "prob" should contain the estimates.

.round

The number of digits to round the results to. Can be set to 'NULL' to prevent rounding.

Value

A dataframe that contains the variable name, the median value, the lower confidence interval, the upper confidence interval, the simulated P-value, and the number of "draws" used to produce the confidence interval.

See Also

Other results: get_prediction_frequentist(), qualitative_assessment(), results_mediation(), results()

Examples

summarize_interval(results)


jacobaro/danalyze documentation built on Oct. 20, 2022, 8:09 a.m.