odr
1.8.3Optimal Design and Statistical Power for Experimental Studies Investigating Main, Mediation, and Moderation Effects
Overview
Calculate the optimal sample size allocation that uses the minimum resources to achieve targeted statistical power in experiments. Perform power analyses with and without accommodating costs and budget. The designs cover single-level and multilevel experiments detecting main, mediation, and moderation effects (and some combinations). The references for the proposed methods include: (1) Shen, Z., & Kelcey, B. (2020). Optimal sample allocation under unequal costs in cluster-randomized trials. Journal of Educational and Behavioral Statistics, 45(4): 446-474. doi:10.3102/1076998620912418. (2) Shen, Z., & Kelcey, B. (2022b). Optimal sample allocation for three-level multisite cluster-randomized trials. Journal of Research on Educational Effectiveness, 15 (1), 130-150. doi:10.1080/19345747.2021.1953200. (3) Shen, Z., & Kelcey, B. (2022a). Optimal sample allocation in multisite randomized trials. The Journal of Experimental Education, 90(3), 693-711. doi:10.1080/00220973.2020.1830361. (4) Shen, Z., Leite, W., Zhang, H., Quan, J., & Kuang, H. (2025). Using ant colony optimization to identify optimal sample allocations in cluster-randomized trials. The Journal of Experimental Education, 93(1), 167-185. doi:10.1080/00220973.2024.2306392. (5) Shen, Z., Li, W., & Leite, W. (in press). Statistical power and optimal design for randomized controlled trials investigating mediation effects. Psychological Methods. doi:10.1037/met0000698. (6) Champely, S. (2020). pwr: Basic functions for power analysis (Version 1.3-0) [Software]. Available from https://CRAN.R-project.org/package=pwr.
Install
Health
- OK2026-06-0913 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- ERROR2026-06-0812 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
- OK2026-03-1014 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 100%
- Documented parameters
- 100%
- Return-value docs
- 94%
- References docs
- 34%
Downloads
Dependencies
Code & Tests
People & History
13 releases. Pick two to compare their code metrics. R releases are shown for context.
- RR 4.6.0 released · 2026-04-24
- 1.8.3Latest
- 1.7.32025-10-31 · diff ↗
- 1.6.32025-08-20 · diff ↗
- 1.5.02025-05-29 · diff ↗
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 1.4.42023-08-08 · diff ↗
- 1.4.22023-04-24 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.4.12023-04-02 · diff ↗
- 1.3.12022-04-30 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 1.2.12021-09-16 · diff ↗
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2017-09-17
- Total releases
- 13 / 9 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.3.0
- Download size
- 144 KB
- Installed size
- not tracked yet
- With dependencies
- not tracked yet