Learn R Programming

powerbrmsINLA (version 1.1.1)

beta_binom_power: Analytic Assurance for Beta-Binomial Designs

Description

Computes assurance (power) using generating and audience Beta priors for a binomial count via a Beta-Binomial predictive distribution.

Usage

beta_binom_power(
  n,
  gen_prior_a,
  gen_prior_b,
  aud_prior_a,
  aud_prior_b,
  hdi_mass = 0.95,
  rope = NULL,
  hdi_max_width = NULL
)

Value

Assurance value between 0 and 1.

Arguments

n

Sample size (number of trials).

gen_prior_a, gen_prior_b

Generating Beta prior parameters.

aud_prior_a, aud_prior_b

Audience Beta prior parameters.

hdi_mass

HDI mass (e.g., 0.95).

rope

Length-2 numeric vector for ROPE bounds, or NULL for max-width rule.

hdi_max_width

Positive width threshold for the HDI (used if rope=NULL).