Description Usage Arguments Value References Examples
Two/One partially nested design occurs when subjects are recruited into groups for the treatment condition, but the remaining participants (or waiting list) are left for the control group (without any intervention clusters). If the interest is to design a sufficiently powered study to detect mediation effect in Two/One design, use power.med_pn21()
.
Three/One partially nested design occurs when subjects are recruited into groups, and a number of groups are guided by the same leader for the treatment condition, but the remaining participants (or waiting list) are left for the control group (without any intervention clusters). If the interest is to design a sufficiently powered study to detect mediation effect in Three/One design, use power.med_pn31()
.
Three/Two partially nested design occurs when subjects are recruited into groups, and a number of groups are guided by the same leader for the treatment condition, however, separate from Two/One and Three/One designs, the remaining participants are nested within providers in the control group (without any intervention clusters, but with nested structure). If the interest is to design a sufficiently powered study to detect mediation effect in Three/Two design, use power.med_pn31()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | power.med_pn21(esa = .50, esB = .50, esb1 = .10,
two.tailed = TRUE, alpha = .05,
mc = TRUE, nsims = 1000, ndraws = 1000,
rhom_trt = .20, rho_trt = .20,
r2m1_ctrl = .20, r2m1_trt = .20, r2m2_trt = .20,
r2y1z_trt = 0, r2y2z_trt = 0,
r2y1_trt = NULL, r2y2_trt = NULL,
g1_ctrl = 0, n_ctrl = 20,
g2_trt = 0, n_trt = 30, J_trt = 20)
power.med_pn31(esa = .50, esB = .50, esb1 = .10, esb2 = .10,
two.tailed = TRUE, alpha = .05,
mc = TRUE, nsims = 1000, ndraws = 1000,
rhom3_trt = .20, rhom2_trt = .20,
rho3_trt = .20, rho2_trt = .20,
r2m1_ctrl = .20, r2m1_trt = .20, r2m2_trt = .20, r2m3_trt = .20,
r2y1z_trt = 0, r2y2z_trt = 0, r2y3z_trt = 0,
r2y1_trt = NULL, r2y2_trt = NULL, r2y3_trt = NULL,
g1_ctrl = 0, n_ctrl = 20,
g3_trt = 0, n_trt = 30, J_trt = 20, K_trt = 20)
power.med_pn32(esa = .50, esB = .50, esb1 = .10, esb2 = .10,
two.tailed = TRUE, alpha = .05,
mc = TRUE, nsims = 1000, ndraws = 1000,
rhom2_ctrl = .20, rhom3_trt = .20, rhom2_trt = .20,
rho3_trt = .20, rho2_trt = .20,
r2m1_ctrl = .20, r2m2_ctrl = .20,
r2m1_trt = .20, r2m2_trt = .20, r2m3_trt = .20,
r2y1z_trt = 0, r2y2z_trt = 0, r2y3z_trt = 0,
r2y1_trt = NULL, r2y2_trt = NULL, r2y3_trt = NULL,
g2_ctrl = 0, n_ctrl = 30, J_ctrl = 20,
g3_trt = 0, n_trt = 20, J_trt = 20, K_trt = 20)
|
esa |
Standardized mean difference in mediator values between treatment and control groups (esa = esa_trt - esa_ctrl). |
esB |
Standardized regression coefficient for mediator - outcome path, capturing level 1 and level 2 (between intervention clusters) effects (esB = esb1 + esb2 for Two/One design, or esB = esb1 + esb2 + esb3 for Three/One or Three/Two designs). |
esb1 |
Standardized regression coefficient for mediator - outcome path at level 1 in the treatment group (within first intervention clusters). |
esb2 |
Standardized regression coefficient for aggregate mediator - outcome path at level 2 in the treatment group (between first intervention clusters). |
alpha |
probability of type I error. |
two.tailed |
logical; |
rhom2_ctrl |
Proportion of unconditional mediator variance between level 2 units (intervention clusters) in the control group. |
rhom3_trt |
Proportion of unconditional mediator variance between level 3 units (second intervention clusters) in the treatment group. |
rhom2_trt |
Proportion of unconditional mediator variance between level 2 units (first intervention clusters) in the treatment group. |
rhom_trt |
Proportion of unconditional mediator variance between level 2 units (intervention clusters) in the treatment group. |
rho3_trt |
Proportion of unconditional outcome variance between level 3 units (second intervention clusters) in the treatment group. |
rho2_trt |
Proportion of unconditional outcome variance between level 2 units (first intervention clusters) in the treatment group. |
rho_trt |
Proportion of unconditional outcome variance between level 2 units (intervention clusters) in the control group. |
r2m1_ctrl |
Proportion of variance in the mediator explained by level 1 covariates in the control group. |
r2m2_ctrl |
Proportion of variance in the aggregate mediator explained by level 2 covariates in the control group. |
r2m1_trt |
Proportion of variance in the level 1 mediator explained by level 1 covariates in the treatment group |
r2m2_trt |
Proportion of variance in the aggregate mediator (at level 2) explained by level 2 covariates in the treatment group. |
r2m3_trt |
Proportion of variance in the aggregate mediator (at level 3) explained by level 3 covariates in the treatment group. |
r2y1z_trt |
Proportion of variance in the level 1 outcome explained by level 1 covariates in the treatment group. |
r2y2z_trt |
Proportion of variance in the aggregate outcome (at level 2) explained by level 2 covariates in the treatment group. |
r2y3z_trt |
Proportion of variance in the aggregate outcome (at level 3) explained by level 3 covariates in the treatment group. |
r2y1_trt |
Proportion of variance in the level 1 outcome explained by level 1 predictors (including mediator) in the treatment group. |
r2y2_trt |
Proportion of variance in the aggregate outcome (level 2) explained by level 2 predictors (including aggregate mediator) in the treatment group. |
r2y3_trt |
Proportion of variance in the aggregate outcome (level 3) explained by level 3 predictors (including aggregate mediator) in the treatment group. |
g1_ctrl |
Number of covariates introduced at level 1 in the control group. |
g2_ctrl |
Number of covariates introduced at level 2 (intervention clusters) in the control group. |
n_ctrl |
Total number of subjects for two/one mediation. Number of subjects per level 2 unit (intervention cluster) in the control group for Three/One and Three/Two mediation. |
J_ctrl |
Number of level 2 units (intervention clusters) in the control group. |
g2_trt |
Number of covariates introduced at level 2 (intervention clusters) in the treatment group. |
g3_trt |
Number of covariates introduced at level 3 (second intervention clusters) in the treatment group. |
n_trt |
Number of subjects per level 2 unit (first intervention cluster). |
J_trt |
Number of level 2 units per level 3 unit (second intervention cluster.) |
K_trt |
Number of level 3 units (second intervention clusters). |
mc |
logical; |
nsims |
number of replications, if |
ndraws |
number of draws from the distribution of the path coefficients for each replication, if |
fun |
function name. |
parms |
list of parameters used in power calculation. |
df |
degrees of freedom. |
ncp |
noncentrality parameter. |
power |
statistical power (1-β). |
Kelcey, B., Bai, F., \& Xie, Y. (2020). Statistical power in partially nested designs probing multilevel mediation. Psychotherapy Research. Advance online publication. doi: 10.1080/10503307.2020.1717012
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # Two/One partially nested design
power.med_pn21(esa = .40, esB = .40, esb1 = .40,
two.tailed = TRUE, alpha = .05,
rhom_trt = .20, rho_trt = .20,
r2m1_ctrl = .60, r2m1_trt = .60, r2m2_trt = .60,
r2y1_trt = .50, r2y2_trt = .50,
n_ctrl = 50, n_trt = 6, J_trt = 50)
# Three/One partially nested design
power.med_pn31(esa = .50, esB = .50, esb1 = .10, esb2 = .10,
rhom3_trt = .10, rhom2_trt = .20, rho3_trt = .10, rho2_trt = .20,
r2m1_ctrl = .20, r2m1_trt = .20, r2m2_trt = .20, r2m3_trt = .20,
r2y1_trt = .20, r2y2_trt = .20, r2y3_trt = .20,
n_ctrl = 60, n_trt = 20, J_trt = 10, K_trt = 60)
# Three/Two partially nested design
power.med_pn32(esa = .50, esB = .50, esb1 = .10, esb2 = .10,
rhom2_ctrl = .20, rhom3_trt = .10, rhom2_trt = .20,
rho3_trt = .10, rho2_trt = .20,
r2m1_ctrl = .20, r2m2_ctrl = .20,
r2m1_trt = .20, r2m2_trt = .20, r2m3_trt = .20,
r2y1_trt = .20, r2y2_trt = .20, r2y3_trt = .20,
n_ctrl = 24, n_trt = 24, J_trt = 12, J_ctrl = 60, K_trt = 60)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.