For an individual-level random assignment design (simple randomized controlled trial) use mdes.ira()
to calculate the minimum detectable effect size, power.ira()
to calculate the statistical power, and mrss.ira()
to calculate the minimum required sample size (number of subjects).
If fixed block effects exist (randomized block designs), that is, treatment effect varies from one block to another but it is not random, use mdes.bira2f1()
to calculate the minimum detectable effect size, power.bira2f1()
to calculate the statistical power, and mrss.bira2f1()
to calculate the minimum required sample size (number of subjects per block).
If block effect is constant, that is, treatment effect does not change from one block to another, use mdes.bira2c1()
to calculate the minimum detectable effect size, power.bira2c1()
to calculate the statistical power, and mrss.bira2c1()
to calculate the minimum required sample size (number of subjects per block).
For partially nested individual-level random assignment designs (simple randomized controlled trial with intervention clusters) use mdes.ira_pn()
to calculate the minimum detectable effect size, power.ira_pn()
to calculate the statistical power, and mrss.ira_pn()
to calculate the minimum required sample size (number of subjects).
mdes.ira(power=.80, alpha=.05, two.tailed=TRUE,
p=.50, g1=0, r21=0, n)power.ira(es=.25, alpha=.05, two.tailed=TRUE,
p=.50, g1=0, r21=0, n)
mrss.ira(es=.25, power=.80, alpha=.05, two.tailed=TRUE,
n0=10, tol=.10,
p=.50, g1=0, r21=0)
mdes.bira2f1(power=.80, alpha=.05, two.tailed=TRUE,
p=.50, g1=0, r21=0, n, J)
power.bira2f1(es=.25, alpha=.05, two.tailed=TRUE,
p=.50, g1=0, r21=0, n, J)
mrss.bira2f1(es=.25, power=.80, alpha=.05, two.tailed=TRUE,
J, n0=10, tol=.10,
p=.50, g1=0, r21=0)
mdes.bira2c1(power=.80, alpha=.05, two.tailed=TRUE,
p=.50, g1=0, r21=0,
n, J)
power.bira2c1(es=.25, alpha=.05, two.tailed=TRUE,
p=.50, g1=0, r21=0,
n, J)
mrss.bira2c1(es=.25, power=.80, alpha=.05, two.tailed=TRUE,
J, n0=10, tol=.10,
p=.50, g1=0, r21=0)
mdes.ira_pn(power=.80, alpha=.05, two.tailed=TRUE,
df=NULL, ratio_tc_var=1,
rho_ic=.20, p=.50, r21=0, n, ic_size=1)
power.ira_pn(es=.25,alpha=.05, two.tailed=TRUE,
df=NULL, ratio_tc_var=1,
rho_ic=.20, p=.50, r21=0, n, ic_size=1)
mrss.ira_pn(es=.25, power=.80, alpha=.05, two.tailed=TRUE,
ratio_tc_var=1, z.test=FALSE,
rho_ic=.20, p=.50, r21=0, ic_size=1, n0=500, tol=.10)
statistical power \((1-\beta)\).
effect size.
probability of type I error.
logical; TRUE
for two-tailed hypothesis testing, FALSE
for one-tailed hypothesis testing.
degrees of freedom.
ratio of the treatment group variance to the control group variance (needed for Satterthwaite approximation to df). Ignored when df
argument is specified.
proportion of variance in the outcome (for treatment group) that is between intervention clusters.
proportion of units randomly assigned to the treatment condition.
number of covariates. g
also works.
proportion of variance in the outcome explained by covariates (and fixed blocks if exists). r2
also works.
sample size (number of subjects per block, if exist, calculated using simple average or harmonic mean). For partially nested design n
is total number of subjects (in all intervention clusters and control group).
level 2 sample size (number of blocks).
sample size in each intervention cluster on average.
starting value for n
.
tolerance to end iterative process for finding n
or J.
logical; TRUE
for z-test.
function name.
list of parameters used in power calculation.
degrees of freedom.
noncentrality parameter.
statistical power \((1-\beta)\).
minimum detectable effect size.
sample size (number of subjects).
Dong, N., & Maynard, R. (2013). PowerUp!: A tool for calculating minimum detectable effect sizes and minimum required sample sizes for experimental and quasi-experimental design studies. Journal of Research on Educational Effectiveness, 6(1), 24-67. 10.1080/19345747.2012.673143
Lohr, S., Schochet, P. Z., & Sanders, E. (2014). Partially Nested Randomized Controlled Trials in Education Research: A Guide to Design and Analysis. NCER 2014-2000. National Center for Education Research. https://ies.ed.gov/ncer/pubs/20142000/pdf/20142000.pdf
# NOT RUN {
# cross-checks
mdes.ira(n=250)
power.ira(es=.356, n=250)
mrss.ira(es=.356)
# cross-checks
mdes.bira2c1(n=15, J=20)
power.bira2c1(es=.325, n=15, J=20)
mrss.bira2c1(es=.325, J=20)
# cross-checks
mdes.bira2f1(n=15, J=20)
power.bira2f1(es=.325, n=15, J=20)
mrss.bira2f1(es=.325, J=20)
# cross-checks
mdes.ira_pn(n=250)
power.ira_pn(es=.377, n=250)
mrss.ira_pn(es=.377, n=250)
# }
Run the code above in your browser using DataLab