power.2.221 {odr} | R Documentation |
Budget and/or sample size, power calculation for CRTs probing mediation effects with cluster-level mediators
Description
This function can calculate required budget for desired power and power under a fixed budget for experimental studies with group mediators probing mediation effects. It also can perform conventional power analyses (e.g., required sample size and power calculation).
Usage
power.2.221(
cost.model = TRUE,
expr = NULL,
constraint = NULL,
sig.level = 0.05,
two.tailed = TRUE,
a = NULL,
b = NULL,
test = "joint",
n = NULL,
p = NULL,
power = NULL,
J = NULL,
m = NULL,
c1 = NULL,
c1t = NULL,
c2 = NULL,
c2t = NULL,
r2m = r2m,
r.yx = 0,
r.mw = 0,
r.yw = 0,
icc = NULL,
q = 0,
q.a = 0,
q.b = 0,
powerlim = NULL,
Jlim = NULL,
mlim = NULL
)
Arguments
cost.model |
Logical; power analyses accommodating costs and budget (e.g., required budget for desired power, power/MDES under fixed budget) if TRUE, otherwise conventional power analyses (e.g., required sample size, power, or MDES calculation); default value is TRUE. |
expr |
returned object from function |
constraint |
specify the constrained value of
|
sig.level |
Significance level or type I error rate, default value is 0.05. |
two.tailed |
Logical; two-tailed tests if TRUE, otherwise one-tailed tests; default value is TRUE. |
a |
The treatment effect on the mediator. |
b |
The within treatment correlation between the outcome and the mediator at the cluster level. |
test |
The type of test will be used to detect mediation effects. Default is the joint significance test (i.e., test = "joint"). The other choice is the Sobel test by specifying the argument as test = "sobel". |
n |
The level-1 sample size per level-2 unit. |
p |
The proportion of level-2 clusters/units to be assigned to treatment. |
power |
Statistical power. |
J |
The total level-2 sample size. |
m |
Total budget. |
c1 |
The cost of sampling one level-1 unit in control condition. |
c1t |
The cost of sampling one level-1 unit in treatment condition. |
c2 |
The cost of sampling one level-2 unit in control condition. |
c2t |
The cost of sampling one level-2 unit in treatment condition. |
r2m |
The proportion of mediator variance explained by covariates in the mediator model. |
r.yx |
The correlation between the outcome and the covariate at the individual level. |
r.mw |
The correlation between the mediator and the covariate at the cluster level. |
r.yw |
The correlation between the outcome and the covariate at the cluster level. |
icc |
The unconditional intraclass correlation coefficient (ICC) in population or in each treatment condition. |
q |
The number of level-2 covariates. |
q.a |
The number of covariates in the mediator model (except the treatment indicator). |
q.b |
The number of covariates in the outcome model at the cluster level (except the treatment indicator and the mediator). |
powerlim |
The range for solving the root of power ( |
Jlim |
The range for searching the root of level-2 sample size ( |
mlim |
the range for searching the root of budget ( |
Value
Required budget (or required sample size), statistical power, or MDES depending on the specification of parameters. The function also returns the function name, design type, and parameters used in the calculation.