ebb_prior_tidiers: Tidy the results of beta-binomial estimation

Description Usage Arguments Value

Description

Tidiers for ebb_prior objects, which store hyperparameters for a prior fit on some binomial data.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'ebb_prior'
tidy(x, ...)

## S3 method for class 'ebb_prior'
augment(x, data, cred_level = 0.95, newdata = NULL, ...)

## S3 method for class 'ebb_prior'
glance(x, ...)

Arguments

x

An object of class "ebb_prior", representing a beta-binomial distribution.

...

Extra arguments (not used)

data

For augment, the original data that should be appended to.

cred_level

For augment, the level of the credible intervals for each observation. If NULL, do not add credible intervals.

newdata

For augment, a new data set.

Value

augment returns the original data frame, with additional columns corresponding to the new posterior parameters of each observation.

glance works only on ebb_prior objects fit with "mm" or "mle": that is, those that have a single alpha and beta for the entire dataset. It returns those parameters:

alpha

Estimated alpha (shape1) parameter

beta

Estimated beta (shape2) parameter

mean

alpha / (alpha + beta): the prior mean


dgrtwo/ebbinom documentation built on May 15, 2019, 7:23 a.m.