betaBinomPosteriorPars: Function to calculate beta-binomial posterior parameters

Description Usage Arguments Details Value

View source: R/Bayesian Helper Functions.R

Description

Function to calculate beta-binomial posterior parameters

Usage

1
2
betaBinomPosteriorPars(Ni = NULL, Si = NULL, Fi = NULL, Nk = NULL,
  Sk = NULL, Fk = NULL, equiv.obs = NULL, pars = NULL)

Arguments

Ni

Number of tests/observations in the data (must be positive if supplied)

Si

Number of successful tests/observations in the data (must be positive if supplied)

Fi

Number of failed tests/observations in the data (must be positive if supplied)

Nk

Number of tests/observations contributing to the prior distribution (must be positive if supplied)

Sk

Number of successful tests/observations contributing to the prior distribution (must be positive if supplied)

Fk

Number of failed tests/observations contributing to the prior distribution (must be positive if supplied)

equiv.obs

Number of equivalent observations supplied by the prior distribution (must be positive if supplied)

pars

prior distribution parameters shape1, shape2 which can be supplied instead of Nk, Sk, Fk, and eff.obs

Details

Two of Ni, Si, Fi must be supplied (non-null); the third will be calculated. Either equiv.obs and two of Nk, Sk, Fk must be supplied, or pars must be a vector of length two or a matrix of at least two columns. Similarly, two of Nk, Sk, Fk must be supplied along with equiv.obs (the prior parameters will be calculated using this information)

Value

data frame with columns alpha and beta, representing parameters shape1 and shape2 of a beta distribution


srvanderplas/nppd documentation built on May 30, 2019, 8:42 a.m.