# NOT RUN {
score.obj <- inspect.score(rnorm(10000), cutoff = 0)
power.bird2(score.obj, order = 2,
es = 0.25, rho2 = .20, omega2 = .30,
g2 = 0, r2t2 = 0, n1 = 50, n2 = 30)
# with 5 blocks df = n2- 2*(n blocks) - g2
# n2: number of level 2 units across five blocks
power.bird2(score.obj, order = 2, df = 100 - 2*5 - 0,
es = 0.25, rho2 = .20, omega2 = .30,
g2 = 0, r2t2 = .30, n1 = 50, n2 = 30)
# optimal combination of sample sizes for level 1 and level 2
# around 20 and 50 respectively, that produce power = .80
cosa.bird2(score.obj, order = 2,
constrain = "power", power = .80,
es = 0.25, rho2 = .20, omega2 = .30,
g2 = 0, r2t2 = 0,
n0 = c(20, 50), n1 = NULL, n2 = NULL)
# }
Run the code above in your browser using DataLab