Learn R Programming

⚠️There's a newer version (1.1.0) of this package.Take me there.

Introduction to PowerUpR

To install PowerUpR package

install.packages("PowerUpR")

PowerUpR is an implementation of PowerUp! in R environment (R Core Team, 2016). PowerUp! is a statistical power analysis tool to calculate minimum detectable effect size (MDES) and top level minimum required sample size (MRSS) for various experimental and quasi-experimental designs including cluster randomized trials (Dong & Maynard, 2013). PowerUpR package solely focuses on cluster randomized trials and adds several additional features. The package bases its framework on three fundemental concepts in statistical power analysis; power calculation, MDES calculation, and sample size calculation. Congruent with this framework, PowerUpR provides tools to calculate power, MDES, MRSS for any level, and to solve constrained optimal sample allocation (COSA) problems (Hedges & Borenstein, 2014; Raudenbush, 1997; Raudenbush & Liu, 2000). COSA problems can be solved in the following forms, (i) under budgetary constraints given marginal costs per unit, (ii) under power constraints given marginal costs per unit, (ii) under MDES constraints given marginal costs per unit, and (iv) under sample size constraints for one or more levels along with any of the i ii, or iii options. Congruent with the three fundemental concepts the package also provides tools for graphing two or three dimensional relationships to investiage relative standing of power, MDES, MRSS or a component of COSA.

A design parameter (one of the MDES, MRSS, power, or OSS) can be requested by using approriate function given design characteristics. Except for graphing functions, each function begins with an output name, following by a period, and a design name. There are four types of output; mdes, power, mrss, and optimal, and 14 types of design; ira1r1, bira2r1, bira2f1, bira2c1, cra2r2, bira3r1, bcra3r2, bcra3f2, cra3r3, bira4r1, bcra4r2, bcra4r3, bcra4f3, and cra4r4. The first three letters of the design stands for the type of assignment, for individual random assignment ira, for blocked individual random assignment bira, and for cluster random assignment cra, for blocked cluster random assignment bcra. It is followed by a number indicating number of levels. A single letter followed by a number indicates whether a block is considered to be r, random; f, fixed; or c, constant and the level at which random assingment takes place. For example, to find MDES for 3-level blocked (random) cluster randomized design where random assignment is at level 2, function mdes.bcra3r2 is used.

Each function requires slightly different arguments depending on the output it produces and the design. Most of the arguments have default values to provide users a starting point. Default values are

  • mdes = .25
  • power = .80
  • alpha = .05
  • two.tail = TRUE
  • P = .50
  • g1, g2, g3, g4 = 0
  • any sequence of R12, R22, R32, R42 = 0
  • any sequence of RT22, RT32, RT42 = 0

Users should be aware of default values and change them if necessary. Minimum required arguments to successfully run a function are

  • any sequence of rho2, rho3, rho4
  • any sequence of omega2, omega3, omega4
  • any one of, any sequence of, or any combination of n, J, K, L

For definition of above-mentioned parameters see Dong & Maynard (2013) and Hedges & Rhoads (2009), or help files in man folder for individual functions. For reference intraclass correlation (rho2, rho3) values see Dong, Reinke, Herman, Bradshaw, and Murray (2016), Hedberg and Hedges (2014), Hedges and Hedberg (2007, 2013), Kelcey, and Phelps (2013), Schochet (2008), Spybrook, Westine, and Taylor (2016). For reference variance (R12, R22, R32) values see Bloom, Richburg-Hayes, and Black (2007), Deke et al. (2010), Dong et al. (2016), Hedges and Hedberg (2013), Kelcey, and Phelps (2013), Spybrook, Westine,and Taylor (2016), Westine, Spybrook, and Taylor (2013). Users can also obtain design parameters for various levels using publicly available state or district data.

For an example describing how to use PowerUpR package click vignettes or go to vignette folder.

Please email us any issues or suggestions.

Metin Bulus bulus.metin@gmail.com
Nianbo Dong dong.nianbo@gmail.com

References

Bloom, H. S., Richburg- Hayes, L. & Black, A. R. (2007). Using Covariates to Improve Precision for Studies that Randomize Schools to Evaluate Educational Interventions. Educational Evaluation and Policy Analysis, 29(1), 0-59.

Deke, John, Dragoset, Lisa, and Moore, Ravaris (2010). Precision Gains from Publically Available School Proficiency Measures Compared to Study-Collected Test Scores in Education Cluster-Randomized Trials (NCEE 2010-4003). Washington, DC: National Center for Education Evaluation and Regional Assistance, Institute of Education Sciences, U.S. Department of Education. Retrieved from http://ies.ed.gov/ncee/pubs/20104003

Dong & Maynard (2013). PowerUp!: A Tool for Calculating Minum Detectable Effect Sizes and Minimum Required Sample Sizes for Experimental and Quasi-Experimental Design Studies,Journal of Research on Educational Effectiveness, 6(1), 24-6.

Dong, N., Reinke, W. M., Herman, K. C., Bradshaw, C. P., & Murray, D. W. (2016). Meaningful effect sizes, intraclass correlations, and proportions of variance explained by covariates for panning two-and three-level cluster randomized trials of social and behavioral outcomes. \emph{Evaluation Review}. doi: 10.1177/0193841X16671283

Hedges, L. V., & Borenstein, M. (2014). Conditional Optimal Design in Three- and Four-Level Experiments. Journal of Educational and Behavioral Statistics, 39(4), 257-281.

Hedberg, E., & Hedges, L. V.(2014). Reference Values of Within-District Intraclass Correlations of Academic Achivement by District Characteristics: Results From a Meta-Analysis of District-Specified Values. Evaluation Review, 38(6), 546-582.

Hedges, L. V., & Hedberg, E. (2007). Interclass correlation values for planning group-randomized trials in education. Educational Evaluation and Policy Analysis, 29(1), 60-87.

Hedges, L. V., & Hedberg, E. (2013). Interclass Correlations and Covariate Outcome Correlations for Planning Two- and Three-Level Cluster-Randomized Experiments in Education. Evaluation Review, 37(6), 445-489.

Hedges, L. & Rhoads, C.(2009). Statistical Power Analysis in Education Research (NCSER 2010-3006). Washington, DC: National Center for Special Education Researc , Institute of Education Sciences, U.S. Department of Education. Retrieved from http://ies.ed.gov/ncser.

Kelcey, B., & Phelps, G. (2013). Strategies for improving power in school randomized studies of professional development. \emph{Evaluation Review, 37(6)}, 520-554.

R Core Team (2016). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL http://www.R-project.org/

Raudenbush, S. W. (1997). Statistical analysis and optimal design for cluster randomized trials. Psychological Methods, 2, 173-185.

Raudenbush, S. W., & Liu, X. (2000). Statistical power and optimal design for multisite trials. Psychological Methods, 5, 199-213.

Schochet, P. Z. (2008). Statistical Power for Random Assignment Evaluations of Education Programs. Journal of Educational and Behavioral Statistics, 33(1), 62-87.

Spybrook, J., Westine, C. D., & Taylor, J. A. (2016). Design Parameters for Impact Research in Science Education: A Multisite Anlaysis. AERA Open, 2(1), 1-15.

Westine, C. D., Spybrook, J., & Taylor, J. A. (2013). An Empirical Investigation of Variance Design Parameters for Planning Cluster-Randomized Trials of Science Achievement. Evaluation Review, 37(6), 490-519.

Copy Link

Version

Install

install.packages('PowerUpR')

Monthly Downloads

255

Version

0.1.2

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

November 1st, 2016

Functions in PowerUpR (0.1.2)

mdes.bira4r1

Model 2.5: MDES Calculator for 4-Level Random Effects Blocked Individual Random Assignment Design, Individuals Randomized within Blocks
mdes.bira3r1

Model 2.4: MDES Calculator for 3-Level Random Effects Blocked Individual Random Assignment Design, Individuals Randomized within Blocks
mdes.bcra4f3

Model 4.4: MDES Calculator for 4-Level Fixed Effects Blocked Cluster Random Assignment Designs, Treatment at Level 3
mdes.bira2c1

Model 2.1: MDES Calculator for 2-Level Constant Effects Blocked Individual Random Assignment Designs, Treatment at Level 1
mdes.bcra4r3

Model 4.5: MDES Calculator for 4-Level Random Effects Blocked Cluster Random Assignment Designs, Treatment at Level 3
mdes.bira2r1

Model 2.3: MDES Calculator for 2-Level Random Effects Blocked Individual Random Assignment Designs, Individuals Randomized within Blocks
mdes.bcra4r2

Model 4.3: MDES Calculator for 4-Level Random Effects Block Random Assignment Designs, Treatment at Level 2
mdes.bcra3f2

Model 4.1: MDES Calculator for 3-Level Fixed Effects Blocked Cluster Random Assignment Design, Treatment at Level 2
mdes.bira2f1

Model 2.2: MDES Calculator for 2-Level Fixed Effects Blocked Individual Random Assignment Designs, Treatment at Level 1
mdes.bcra3r2

Model 4.2: MDES Calculator for 3-Level Random Effects Blocked Cluster Random Assignment Designs, Treatment at Level 2
mrss.bcra3f2

Model 4.1: MRSS Calculator for 3-Level Fixed Effects Blocked Cluster Random Assignment Designs, Treatment at Level 2
mdes.cra4r4

Model 3.3: MDES Calculator for 4-Level Cluster Random Assignment Designs, Treatment at Level 4
mdes.ira1r1

Model 1.0: MDES Calculator for Individual Random Assignment Designs, Completely Randomized Controlled Trials
mrss.bcra3r2

Model 4.2: MRSS Calculator for 3-Level Random Effects Blocked Cluster Random Assignment Designs, Treatment at Level 2
mrss.bcra4f3

Model 4.4: MRSS Calculator for 4-Level Fixed Effects Blocked Cluster Random Assignment Designs, Treatment at Level 3
mdes.cra2r2

Model 3.1: MDES Calculator for 2-Level Cluster Random Assignment Design, Treatment at Level 2
mrss.bcra4r2

Model 4.3: MRSS Calculator for 4-Level Random Effects Block Random Assignment Designs, Treatment at Level 2
mrss.bcra4r3

Model 4.5: MRSS Calculator for 4-Level Random Effects Blocked Cluster Random Assignment Designs, Treatment at Level 3
mdes.cra3r3

Model 3.2: MDES Calculator for 3-Level Cluster Random Assignment Designs, Treatment at Level 3
mrss.bira2c1

Model 2.1: MRSS Calculator for 2-Level Constant Effects Blocked Individual Random Assignment Designs, Treatment at Level 1
mrss.cra2r2

Model 3.1: MRSS Calculator for 2-Level Cluster Random Assignment Design, Treatment at Level 2
mrss.to.mdes

MRSS to MDES
mrss.bira3r1

Model 2.4: MRSS Calculator for 3-Level Random Effects Blocked Individual Random Assignment Design, Individuals Randomized within Blocks
mrss.to.power

MRSS to Power
mrss.cra3r3

Model 3.2: MRSS Calculator for 3-Level Cluster Random Assignment Designs, Treatment at Level 3
mrss.ira1r1

Model 1.0: MRSS Calculator for Individual Random Assignment Designs, Completely Randomized Controlled Trials
mrss.bira2f1

Model 2.2: MRSS Calculator for 2-Level Fixed Effects Blocked Individual Random Assignment Designs, Treatment at Level 1
mrss.bira2r1

Model 2.3: MRSS Calculator for 2-Level Random Effects Blocked Individual Random Assignment Designs, Individuals Randomized within Blocks
mrss.cra4r4

Model 3.3: MRSS Calculator for 4-Level Cluster Random Assignment Designs, Treatment at Level 4
mrss.bira4r1

Model 2.5: MRSS Calculator for 4-Level Random Effects Blocked Individual Random Assignment Design, Individuals Randomized within Blocks
optimal.bcra3f2

Model 4.1: COSA Solver for 3-Level Fixed Effects Blocked Cluster Random Assignment Designs, Treatment at Level 2
optimal.bcra3r2

Model 4.2: COSA Solver for 3-Level Random Effects Blocked Cluster Random Assignment Designs, Treatment at Level 2
optimal.bira2c1

Model 2.1: COSA Solver for 2-Level Constant Effects Blocked Individual Random Assignment Designs, Treatment at Level 1
optimal.bcra4f3

Model 4.4: COSA Solver for 4-Level Fixed Effects Blocked Cluster Random Assignment Designs, Treatment at Level 3
optimal.bira2r1

Model 2.3: COSA Solver for 2-Level Random Effects Blocked Individual Random Assignment Designs, Individuals Randomized within Blocks
optimal.bira3r1

Model 2.4: COSA Solver for 3-Level Random Effects Blocked Individual Random Assignment Design, Individuals Randomized within Blocks
optimal.bira4r1

Model 2.5: COSA Solver for 4-Level Random Effects Blocked Individual Random Assignment Design, Individuals Randomized within Blocks
optimal.bira2f1

Model 2.2: COSA Solver for 2-Level Fixed Effects Blocked Individual Random Assignment Designs, Treatment at Level 1
optimal.bcra4r2

Model 4.3: COSA Solver for 4-Level Random Effects Block Random Assignment Designs, Treatment at Level 2
optimal.bcra4r3

Model 4.5: COSA Solver for 4-Level Random Effects Blocked Cluster Random Assignment Designs, Treatment at Level 3
optimal.ira1r1

Model 1.0: COSA Solver for Individual Random Assignment Designs, Completely Randomized Controlled Trials
power.bcra3r2

Model 4.2: Statistical Power Calculator for 3-Level Random Effects Blocked Cluster Random Assignment Designs, Treatment at Level 2
optimal.to.mdes

Optimal to MDES
optimal.to.power

Optimal to Power
optimal.cra4r4

Model 3.3: COSA Solver for 4-Level Cluster Random Assignment Designs, Treatment at Level 4
power.bcra4f3

Model 4.4: Statistical Power Calculator for 4-Level Fixed Effects Blocked Cluster Random Assignment Designs, Treatment at Level 3
optimal.cra3r3

Model 3.2: COSA Solver for 3-Level Cluster Random Assignment Designs, Treatment at Level 3
optimal.cra2r2

Model 3.1: COSA Solver for 2-Level Cluster Random Assignment Design, Treatment at Level 2
plot.pars

Plots Duo or Trio Relationships between Statistical Power, MDES, MRSS, and COSA
power.bcra3f2

Model 4.1: Statistical Power Calculator for 3-Level Fixed Effects Blocked Cluster Random Assignment Design, Treatment at Level 2
power.bira4r1

Model 2.5: Statistical Power Calculator for 4-Level Random Effects Blocked Individual Random Assignment Design, Individuals Randomized within Blocks
power.cra2r2

Model 3.1: Statistical Power Calculator for 2-Level Cluster Random Assignment Design, Treatment at Level 2
power.bira2c1

Model 2.1: Statistical Power Calculator for 2-Level Constant Effects Blocked Individual Random Assignment Designs, Treatment at Level 1
power.bcra4r2

Model 4.3: Statistical Power Calculator for 4-Level Random Effects Block Random Assignment Designs, Treatment at Level 2
t1t2.error

Plots Type I and Type II Error Rates
power.bira2f1

Model 2.2: Statistical Power Calculator for 2-Level Fixed Effects Blocked Individual Random Assignment Designs, Treatment at Level 1
power.bcra4r3

Model 4.5: Statistical Power Calculator for 4-Level Random Effects Blocked Cluster Random Assignment Designs, Treatment at Level 3
power.bira2r1

Model 2.3: Statistical Power Calculator for 2-Level Random Effects Blocked Individual Random Assignment Designs, Individuals Randomized within Blocks
power.bira3r1

Model 2.4: Statistical Power Calculator for 3-Level Random Effects Blocked Individual Random Assignment Design, Individuals Randomized within Blocks
power.ira1r1

Model 1.0: Statistical Power Calculator for Individual Random Assignment Designs, Completely Randomized Controlled Trials
introduction

Introduction to PowerUpR
power.cra3r3

Model 3.2: Statistical Power Calculator for 3-Level Cluster Random Assignment Designs, Treatment at Level 3
power.cra4r4

Model 3.3: Statistical Power Calculator for 4-Level Cluster Random Assignment Designs, Treatment at Level 4