tidy.beta_binomial_fit: Tidy results of a Beta-Binomial model fit

Description Usage Arguments Value Examples

View source: R/beta_binom.R

Description

Returns a tidy tibble summarizing posteriors with point estimates and credible intervals for group proportions, proportion difference, relative risk, and odds ratio.

Usage

1
2
## S3 method for class 'beta_binomial_fit'
tidy(x, conf_level = 0.95, interval_type = c("quantile", "HPD"), ...)

Arguments

x

An object of class "beta_binomial_fit".

conf_level

Probability level for credible intervals. 95% by default.

interval_type

Method for computing intervals ("quantile" or "HPD").

Value

A tibble with the following columns:

term

Name of the parameter.

estimate

Point estimate (median of posterior draws).

std.error

Standard error.

conf.low

Credible interval lower bound.

conf.high

Credible interval upper bound.

Examples

1
2
3
4
## Not run: 
tidy(beta_binom(x = c(200, 250), n = c(350, 550)))

## End(Not run)

bearloga/BCDA documentation built on Feb. 8, 2021, 3:43 p.m.