Learn R Programming

powerbrmsINLA (version 1.1.1)

min_n_beta_binom: Minimum n for Target Assurance (Beta-Binomial)

Description

Minimum n for Target Assurance (Beta-Binomial)

Usage

min_n_beta_binom(
  gen_prior_mode,
  gen_prior_n,
  desired_power,
  aud_prior_mode = 0.5,
  aud_prior_n = 2,
  hdi_mass = 0.95,
  rope = NULL,
  hdi_max_width = NULL,
  n_start = 20,
  n_max = 1e+05,
  verbose = TRUE
)

Value

Smallest n meeting the target assurance.

Arguments

gen_prior_mode

Generating prior mode in (0,1).

gen_prior_n

Generating prior concentration (>= 2).

desired_power

Target assurance value in (0,1).

aud_prior_mode

Audience prior mode in (0,1).

aud_prior_n

Audience prior concentration (>= 2).

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).

n_start

Starting sample size for search.

n_max

Maximum sample size to try.

verbose

If TRUE, prints progress.