N_min: N_min() computes the minimum population needed to detect difference between control group and each treatment, given a target minimum detectable effect
Description
N_min() computes the minimum population needed to detect difference between control group and each treatment, given a target minimum detectable effect
A tibble with the share_control and N observations in control group (N_control),
the share and N of each treatment c(share_ti, N_ti),
total share of treatment rows and N treated (share_treat, N_treat), N,
the minimum detectable difference between control and all treatments together (tau_min_global),
the minimum detectable difference between control and each treatment (tau_min_each_treat)
Arguments
outcome_var
the variable for which you wish to test the impact of treatment
tau_min
the target detectable effect (in outcome_var units)
power
The level of power of the test (1 - Pr(Reject H_0 | H_0 True) ). Default is 0.8
significance
The level of significance of the test Pr(Reject H_0 | H_0 False). Default is 0.05
share_control
The share of observations in N assigned to control. This argument allows for sequences (i.e. seq(0,1,0.1))
n_groups
Number of groups (control + # treatment groups)
Details
This function calculates the minimum experiment's population needed in order to detect at least a difference of tau_min
statistically significantly. This is between any two given groups (e.g. control vs each treatment), given
the outcome variable, power and significance