power_analysis_binomial: Calculate minimum sample size needed for binomial experiment

View source: R/power_analysis.R

power_analysis_binomialR Documentation

Calculate minimum sample size needed for binomial experiment

Description

Either null_value or hdi_max_width must be null, depending whether the goal is reject a particular null value or estimating parameter with specified precision

Usage

power_analysis_binomial(
  gen_prior_mode,
  gen_prior_n,
  hdi_max_width = NULL,
  null_value = NULL,
  rope = c(max(0, null_value - 0.02), min(1, null_value + 0.02)),
  desired_power = 0.8,
  aud_prior_mode = 0.5,
  aud_prior_n = 2,
  hdi_mass = 0.95,
  init_samp_size = 20,
  verbose = TRUE
)

Arguments

gen_prior_mode

Expected mode of prior

gen_prior_n

N of prior (higher leads to more precision)

hdi_max_width

Maximum width of HDI

null_value

Null value

rope

Region of practical equivalence around parameter

desired_power

Level of power

aud_prior_mode

Prior understanding of mode from audience

hdi_mass

Range of HDI

init_samp_size

Initial sample size

verbose

Should each attempt be displayed?

aud_prior

Prior understanding of variation from audience

Details

Function was derived by Solomon Kurz's bookdown converting Kruschke's book into brms and tidyverse

Source

https://bookdown.org/content/3686/goals-power-and-sample-size.html#computing-power-and-sample-size/


scottfrechette/funcyfrech documentation built on Aug. 26, 2022, 9:13 a.m.