Skip to content

odr

Optimal Design and Statistical Power for Experimental Studies Investigating Main, Mediation, and Moderation Effects

v1.8.3 · Feb 11, 2026 · GPL-3

Description

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>.

Downloads

342

Last 30 days

11296th

978

Last 90 days

4.4K

Last year

Trend: -19.5% (30d vs prior 30d)

CRAN Check Status

14 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Reverse Dependencies (1)

suggests

Dependency Network

Dependencies Reverse dependencies base(>= 3.0.0) anomo odr

Version History

new 1.8.3 Mar 10, 2026
updated 1.8.3 ← 1.7.3 diff Feb 10, 2026
updated 1.7.3 ← 1.6.3 diff Oct 30, 2025
updated 1.6.3 ← 1.5.0 diff Aug 19, 2025
updated 1.5.0 ← 1.4.4 diff May 28, 2025
updated 1.4.4 ← 1.4.2 diff Aug 7, 2023
updated 1.4.2 ← 1.4.1 diff Apr 23, 2023
updated 1.4.1 ← 1.3.1 diff Apr 1, 2023
updated 1.3.1 ← 1.2.1 diff Apr 29, 2022
updated 1.2.1 ← 1.0.2 diff Sep 15, 2021
updated 1.0.2 ← 1.0.0 diff Mar 12, 2020
updated 1.0.0 ← 0.7.3 diff Oct 2, 2018
updated 0.7.3 ← 0.3.2 diff Jan 2, 2018
new 0.3.2 Sep 16, 2017