This function calculates needed J to achieve a given (unadjusted) power
calc_J(
d_m,
MT = 2.8,
MDES,
K = NULL,
nbar,
Tbar,
R2.1,
R2.2,
R2.3,
ICC.2,
ICC.3,
omega.2,
omega.3
)
J, the number of schools needed
a single RCT design (see list/naming convention)
Number of approximate effect-size unit SEs (adjusted for degrees of freedom issues) that the MDES needs to be to achieve desired power. E.g., 2.8 for normal theory.
scalar; the MDES values for each outcome
scalar; the number of level 3 units (districts).
scalar; the harmonic mean of the number of level 1 units per level 2 unit (students per school). Note that this is not the total number of level 1 units, but instead the number of level 1 units nested within each level 2 unit, so the total number of level 1 units is nbar x J x K.
scalar; the proportion of samples that are assigned to the treatment.
scalar, or vector of length M; percent of variation explained by level 1 covariates for each outcome.
scalar, or vector of length M; percent of variation explained by level 2 covariates for each outcome.
scalar, or vector of length M; percent of variation explained by level 3 covariates for each outcome.
scalar, or vector of length M; level 2 (school) intraclass correlation.
scalar, or vector length M; level 3 (district) intraclass correlation.
scalar, or vector of length M; ratio of variance of level 2 average impacts to variance of level 2 random intercepts.
scalar, or vector of length M; ratio of variance of level 3 average impacts to variance of level 3 random intercepts.