# NOT RUN {
# cross-checks for the main effect
mdes.cra3r3(rho3=.06, rho2=.17, n=15, J=3, K=60)
power.cra3r3(es=.269, rho3=.06, rho2=.17, n=15, J=3, K=60)
mrss.cra3r3(es=.269, rho3=.06, rho2=.17, n=15, J=3)
# cross-checks for the randomly varying cont. L1 moderator effect
mdes.mod331(power=.80, alpha=.05, two.tailed=TRUE,
rho2=.17, rho3=.06, omegam2=.10, omegam3=.10,
q=NULL, n=15, J=3, K=60)
power.mod331(es=0.1248, alpha=.05, two.tailed=TRUE,
rho2=.17, rho3=.06, omegam2=.10, omegam3=.10,
q=NULL, n=15, J=3, K=60)
mrss.mod331(es=0.1248, alpha=.05, two.tailed=TRUE,
rho2=.17, rho3=.06, omegam2=.10, omegam3=.10,
q=NULL, n=15, J=3)
# cross-checks for the non-randomly varying cont. L1 moderator effect
mdesd.mod331(power=.80, alpha=.05, two.tailed=TRUE,
rho2=.17, rho3=.06, omegam2=0, omegam3=0,
q=NULL, n=15, J=3, K=60)
power.mod331(es=.0946, alpha=.05, two.tailed=TRUE,
rho2=.17, rho3=.06, omegam2=0, omegam3=0,
q=NULL, n=15, J=3, K=60)
mrss.mod331(es=.0946, alpha=.05, two.tailed=TRUE,
rho2=.17, rho3=.06, omegam2=0, omegam3=0,
q=NULL, n=15, J=3)
# cross-checks for the randomly varying bin. L1 moderator effect
mdesd.mod331(power=.80, alpha=.05, two.tailed=TRUE,
rho2=.17, rho3=.06, omegam2=.10, omegam3=.10,
q=.50, n=15, J=3, K=60)
power.mod331(es=.2082, alpha=.05, two.tailed=TRUE,
rho2=.17, rho3=.06, omegam2=.10, omegam3=.10,
q=.50, n=15, J=3, K=60)
mrss.mod331(es=.2082, alpha=.05, two.tailed=TRUE,
rho2=.17, rho3=.06, omegam2=.10, omegam3=.10,
q=.50, n=15, J=3)
# cross-checks for the non-randomly varying bin. L1 moderator effect
mdesd.mod331(power=.80, alpha=.05, two.tailed=TRUE,
rho2=.17, rho3=.06, omegam2=0, omegam3=0,
q=.50, n=15, J=3, K=60)
power.mod331(es=.1893, alpha=.05, two.tailed=TRUE,
rho2=.17, rho3=.06, omegam2=0, omegam3=0,
q=.50, n=15, J=3, K=60)
mrss.mod331(es=.1893, alpha=.05, two.tailed=TRUE,
rho2=.17, rho3=.06, omegam2=0, omegam3=0,
q=.50, n=15, J=3)
# 3-2-1 mediation
power.med321(esa= .51, esB = .30, rhom3 = 0.27, rho2 = .15, rho3 = .19,
r2m2 = .07, r2m3 = .16, r21 = .02, r22 = .41, r23 = .38,
p = .50, n = 20, J = 4, K = 60)
# }
Run the code above in your browser using DataLab