View source: R/beta_binomial_pmf.R
beta_binomial_pmf | R Documentation |
Helper function used in a modified version of Zhong & Koopmeiners (2013) sample size reestimation approach. The original paper details a design which compares two proportions and has an accompanying specification for the reestimation procedure based on a z-statistic to save computational time. In the case of one proportion, we can use beta-binomial distribution directly.
beta_binomial_pmf(m, alpha, beta, successes, failures)
m |
second stage sample size |
successes |
number of observed successes in first n samples |
failures |
number of observed failures in first n samples |
prior_alpha |
alpha parameter of beta prior, defaults to .5 (Jeffrey's prior) |
prior_beta |
beta parameter of beta prior, defaults to .5 (Jeffrey's prior) |
a df of simulated outcomes and posterior probabilities
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.