Cross-checks

2018-02-16

To install PowerUpR:

install.packages("PowerUpR")

Individual-level Random Assignment Design

d1 <- mdes.ira1r1(power=.80, n=250)
## 
##  Minimum detectable effect size: 
##  --------------------------------------- 
##  MDES is 0.356 95% CI [0.107,0.605] with 80% power 
##  ---------------------------------------
##  Degrees of freedom:248
##  Standardized standard error:0.126
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
power.ira1r1(es=d1$mdes[1], n=250)
## 
##  Statistical power: 
##  --------------------------------------- 
##  80% power to detect an ES of 0.356 95% CI [0.107,0.605] 
##  --------------------------------------- 
##  Degrees of freedom:248
##  Standardized standard error:0.126
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
mrss.ira1r1(es=d1$mdes[1])
## n = 250

Two-Level Blocked (Constant Treatment Effect) Individual-level Random Assignment Design, Treatment at Level 1

d1 <- mdes.bira2c1(power=.80, n=15, J=20)
## 
##  Minimum detectable effect size: 
##  --------------------------------------- 
##  MDES is 0.325 95% CI [0.097,0.552] with 80% power 
##  ---------------------------------------
##  Degrees of freedom:279
##  Standardized standard error:0.115
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
power.bira2c1(es=d1$mdes[1], n=15, J=20)
## 
##  Statistical power: 
##  --------------------------------------- 
##  80% power to detect an ES of 0.325 95% CI [0.097,0.552] 
##  --------------------------------------- 
##  Degrees of freedom:279
##  Standardized standard error:0.115
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
mrss.bira2c1(es=d1$mdes[1], n=15)
## J = 20

Two-Level Blocked (Fixed Treatment Effect) Individual-level Random Assignment Design, Treatment at Level 1

d1 <- mdes.bira2f1(power=.80, n=15, J=20)
## 
##  Minimum detectable effect size: 
##  --------------------------------------- 
##  MDES is 0.325 95% CI [0.097,0.552] with 80% power 
##  ---------------------------------------
##  Degrees of freedom:260
##  Standardized standard error:0.115
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
power.bira2f1(es=d1$mdes[1], n=15, J=20)
## 
##  Statistical power: 
##  --------------------------------------- 
##  80% power to detect an ES of 0.325 95% CI [0.097,0.552] 
##  --------------------------------------- 
##  Degrees of freedom:260
##  Standardized standard error:0.115
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
mrss.bira2f1(es=d1$mdes[1], n=15)
## J = 20

Two-Level Blocked Individual-level Random Assignment Design, Treatment at Level 1

d1 <- mdes.bira2r1(power=.80, rho2=.17, omega2=.50, n=15, J=20)
## 
##  Minimum detectable effect size: 
##  --------------------------------------- 
##  MDES is 0.366 95% CI [0.107,0.625] with 80% power 
##  ---------------------------------------
##  Degrees of freedom:19
##  Standardized standard error:0.124
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
power.bira2r1(es=d1$mdes[1], rho2=.17, omega2=.50, n=15, J=20)
## 
##  Statistical power: 
##  --------------------------------------- 
##  80% power to detect an ES of 0.366 95% CI [0.107,0.625] 
##  --------------------------------------- 
##  Degrees of freedom:19
##  Standardized standard error:0.124
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
mrss.bira2r1(es=d1$mdes[1], rho2=.17, omega2=.50, n=15)
## J = 20

Two-Level Cluster-level Random Assignment Design, Treatment at Level 2

d1 <- mdes.cra2r2(power=.80, rho2=.17, n=15, J=20)
## 
##  Minimum detectable effect size: 
##  --------------------------------------- 
##  MDES is 0.629 95% CI [0.183,1.075] with 80% power 
##  ---------------------------------------
##  Degrees of freedom:18
##  Standardized standard error:0.212
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
power.cra2r2(es=d1$mdes[1], rho2=.17, n=15, J=20)
## 
##  Statistical power: 
##  --------------------------------------- 
##  80% power to detect an ES of 0.629 95% CI [0.183,1.075] 
##  --------------------------------------- 
##  Degrees of freedom:18
##  Standardized standard error:0.212
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
mrss.cra2r2(es=d1$mdes[1], rho2=.17, n=15)
## J = 20

Three-Level (Fixed Treatment Effect) Blocked Cluster-level Random Assignment Design, Treatment at Level 2

d1 <- mdes.bcra3f2(power=.80, rho2=.10, n=20, J=44, K=5)
## 
##  Minimum detectable effect size: 
##  --------------------------------------- 
##  MDES is 0.145 95% CI [0.043,0.246] with 80% power 
##  ---------------------------------------
##  Degrees of freedom:210
##  Standardized standard error:0.051
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
power.bcra3f2(es=d1$mdes[1], rho2=.10, n=20, J=44, K=5)
## 
##  Statistical power: 
##  --------------------------------------- 
##  80% power to detect an ES of 0.145 95% CI [0.043,0.246] 
##  --------------------------------------- 
##  Degrees of freedom:210
##  Standardized standard error:0.051
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
mrss.bcra3f2(es=d1$mdes[1], rho2=.10, n=20, J=44)
## K = 5

Three-Level Blocked Individual-level Random Assignment Design, Treatment at Level 1

d1 <- mdes.bira3r1(power=.80, rho3=.20, rho2=.15,
                   omega3=.10, omega2=.10,
                   n=69, J=10, K=100)
## 
##  Minimum detectable effect size: 
##  --------------------------------------- 
##  MDES is 0.045 95% CI [0.013,0.077] with 80% power 
##  ---------------------------------------
##  Degrees of freedom:99
##  Standardized standard error:0.016
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
power.bira3r1(es=d1$mdes[1], rho3=.20, rho2=.15,
              omega3=.10, omega2=.10,
              n=69, J=10, K=100)
## 
##  Statistical power: 
##  --------------------------------------- 
##  80% power to detect an ES of 0.045 95% CI [0.013,0.077] 
##  --------------------------------------- 
##  Degrees of freedom:99
##  Standardized standard error:0.016
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
mrss.bira3r1(es =d1$mdes[1], rho3=.20, rho2=.15,
             omega3=.10, omega2=.10,
             n=69, J=10)
## K = 100

Three-Level Blocked Cluster-level Random Assignment Design, Treatment at Level 2

d1 <- mdes.bcra3r2(power=.80, rho3=.13, rho2=.10, omega3=.4,
                   n=10, J=6, K=24)
## 
##  Minimum detectable effect size: 
##  --------------------------------------- 
##  MDES is 0.246 95% CI [0.072,0.42] with 80% power 
##  ---------------------------------------
##  Degrees of freedom:23
##  Standardized standard error:0.084
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
power.bcra3r2(es=d1$mdes[1], rho3=.13, rho2=.10, omega3=.4,
              n=10, J=6, K=24)
## 
##  Statistical power: 
##  --------------------------------------- 
##  80% power to detect an ES of 0.246 95% CI [0.072,0.42] 
##  --------------------------------------- 
##  Degrees of freedom:23
##  Standardized standard error:0.084
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
mrss.bcra3r2(es=d1$mdes[1], rho3=.13, rho2=.10, omega3=.4,
             n=10, J=6)
## K = 24

Three-Level Cluster-level Random Assignment Design, Treatment at Level 3

d1 <- mdes.cra3r3(power=.80, rho3=.06, rho2=.17, n=15, J=3, K=60)
## 
##  Minimum detectable effect size: 
##  --------------------------------------- 
##  MDES is 0.269 95% CI [0.08,0.458] with 80% power 
##  ---------------------------------------
##  Degrees of freedom:58
##  Standardized standard error:0.094
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
power.cra3r3(es=d1$mdes[1], rho3=.06, rho2=.17, n=15, J=3, K=60)
## 
##  Statistical power: 
##  --------------------------------------- 
##  80% power to detect an ES of 0.269 95% CI [0.08,0.458] 
##  --------------------------------------- 
##  Degrees of freedom:58
##  Standardized standard error:0.094
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
mrss.cra3r3(es=d1$mdes[1], rho3=.06, rho2=.17, n=15, J=3)
## K = 60

Four-Level (Fixed Treatment Effect) Blocked Cluster-level Random Assignment Design, Treatment at Level 3

d1 <- mdes.bcra4f3(power=.80, rho3=.15, rho2=.15,
                   n=10, J=4, K=4, L=15)
## 
##  Minimum detectable effect size: 
##  --------------------------------------- 
##  MDES is 0.339 95% CI [0.1,0.577] with 80% power 
##  ---------------------------------------
##  Degrees of freedom:30
##  Standardized standard error:0.117
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
power.bcra4f3(es=d1$mdes[1], rho3=.15, rho2=.15,
              n=10, J=4, K=4, L=15)
## 
##  Statistical power: 
##  --------------------------------------- 
##  80% power to detect an ES of 0.339 95% CI [0.1,0.577] 
##  --------------------------------------- 
##  Degrees of freedom:30
##  Standardized standard error:0.117
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
mrss.bcra4f3(es=d1$mdes[1], rho3=.15, rho2=.15,
             n=10, J=4, K=4)
## L = 15

Four-Level Blocked Individual-level Random Assignment Design, Treatment at Level 1

d1 <- mdes.bira4r1(power=.80, rho4=.05, rho3=.15, rho2=.15,
                   omega4=.50, omega3=.50, omega2=.50,
                   n=10, J=4, K=4, L=27)
## 
##  Minimum detectable effect size: 
##  --------------------------------------- 
##  MDES is 0.142 95% CI [0.042,0.243] with 80% power 
##  ---------------------------------------
##  Degrees of freedom:26
##  Standardized standard error:0.049
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
power.bira4r1(es=d1$mdes[1], rho4=.05, rho3=.15, rho2=.15,
              omega4=.50, omega3=.50, omega2=.50,
              n=10, J=4, K=4, L=27)
## 
##  Statistical power: 
##  --------------------------------------- 
##  80% power to detect an ES of 0.143 95% CI [0.042,0.243] 
##  --------------------------------------- 
##  Degrees of freedom:26
##  Standardized standard error:0.049
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
mrss.bira4r1(es=d1$mdes[1], rho4=.05, rho3=.15, rho2=.15,
             omega4=.50, omega3=.50, omega2=.50,
             n=10, J=4, K=4)
## L = 27

Four-Level Blocked Cluster-level Random Assignment Design, Treatment at Level 2

d1 <- mdes.bcra4r2(power=.80, rho4=.05, rho3=.15, rho2=.15,
                   omega4=.50, omega3=.50, n=10, J=4, K=4, L=20)
## 
##  Minimum detectable effect size: 
##  --------------------------------------- 
##  MDES is 0.206 95% CI [0.06,0.352] with 80% power 
##  ---------------------------------------
##  Degrees of freedom:19
##  Standardized standard error:0.07
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
power.bcra4r2(es=d1$mdes[1], rho4=.05, rho3=.15, rho2=.15,
              omega4=.50, omega3=.50, n=10, J=4, K=4, L=20)
## 
##  Statistical power: 
##  --------------------------------------- 
##  80% power to detect an ES of 0.206 95% CI [0.06,0.352] 
##  --------------------------------------- 
##  Degrees of freedom:19
##  Standardized standard error:0.07
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
mrss.bcra4r2(es=d1$mdes[1], rho4=.05, rho3=.15, rho2=.15,
             omega4=.50, omega3=.50, n=10, J=4, K=4)
## L = 20

Four-Level Blocked Cluster-level Random Assignment Design, Treatment at Level 3

d1 <- mdes.bcra4r3(power=.80, rho4=.05, rho3=.15, rho2=.15,
                   omega4=.50, n=10, J=4, K=4, L=20)
## 
##  Minimum detectable effect size: 
##  --------------------------------------- 
##  MDES is 0.316 95% CI [0.092,0.54] with 80% power 
##  ---------------------------------------
##  Degrees of freedom:19
##  Standardized standard error:0.107
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
power.bcra4r3(es=d1$mdes[1], rho4=.05, rho3=.15, rho2=.15,
              omega4=.50, n=10, J=4, K=4, L=20)
## 
##  Statistical power: 
##  --------------------------------------- 
##  80% power to detect an ES of 0.316 95% CI [0.092,0.54] 
##  --------------------------------------- 
##  Degrees of freedom:19
##  Standardized standard error:0.107
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
mrss.bcra4r3(es=d1$mdes[1], rho4=.05, rho3=.15, rho2=.15,
             omega4=.50, n=10, J=4, K=4)
## L = 20

Four-Level Cluster-level Random Assignment Design, Treatment at Level 4

d1 <- mdes.cra4r4(power=.80, rho4=.05, rho3=.05, rho2=.10,
                  n=10, J=2, K=3, L=20)
## 
##  Minimum detectable effect size: 
##  --------------------------------------- 
##  MDES is 0.412 95% CI [0.12,0.704] with 80% power 
##  ---------------------------------------
##  Degrees of freedom:18
##  Standardized standard error:0.139
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
power.cra4r4(es=d1$mdes[1], rho4=.05, rho3=.05, rho2=.10,
             n=10, J=2, K=3, L=20)
## 
##  Statistical power: 
##  --------------------------------------- 
##  80% power to detect an ES of 0.412 95% CI [0.12,0.704] 
##  --------------------------------------- 
##  Degrees of freedom:18
##  Standardized standard error:0.139
##  Type I error rate:0.05
##  Type II error rate:0.2
##  Two-tailed test:TRUE
mrss.cra4r4(es=d1$mdes[1], rho4=.05, rho3=.05, rho2=.10,
            n=10, J=2, K=3)
## L = 20