This function calculates needed nbar to achieve a given power
calc_nbar(
d_m,
MT = 2.8,
MDES,
J = NULL,
K = NULL,
Tbar,
R2.1,
R2.2 = NULL,
ICC.2 = NULL,
omega.2 = NULL,
R2.3 = NULL,
ICC.3 = NULL,
omega.3 = NULL
)
nbar, the number of individuals needed, or NA if not possible given design
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 schools
scalar; the number of level 3 units (districts).
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; level 2 (school) 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; percent of variation explained by level 3 covariates for each outcome.
scalar, or vector length M; level 3 (district) intraclass correlation.
scalar, or vector of length M; ratio of variance of level 3 average impacts to variance of level 3 random intercepts.