Skip to content

odr

1.8.3

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

1packages depend
3.8Kdownloads / year
test coverage
13/13checks pass

Overview

About
Maintained by Zuchao ShenFirst published 2017-09-1713 releasesCRAN page ↗

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

CRAN checks
13OK
Slowest check: 4.0 min · r-oldrel-macos-x86_64
Code health
None
Tests · ratio 0.00
not tracked
Coverage
100%
Documentation · exports
3
Dependencies · direct
Check history
  • OK2026-06-09
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-06-08
    12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMENoVignettesYes · dynamicpkgdown siteNoNEWSNoCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
100%
Return-value docs
94%
References docs
34%

Downloads

3.8K
CRAN downloads in the past year
Rank #14,816 · ~11/day · ~320/mo
Daily download trend is not available in this view yet.
22430 days
75190 days
3.8K1 year
Compare downloads with other packages →
Also on133 r2u32 autocran103 c2d4u

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)
Depends (4)
R >= 3.3.0statsgraphicsbase(>= 3.0.0)
Imports (0)
none
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
1direct
0indirect

Code & Tests

People & History

People (2)
Maintainer (1)
Author, Maintainer
Authors (2)
Author, Maintainer
Author · added in 1.2.1
Listed in earlier versions (1)
no longer listed · 1.0.0 to 1.0.2
Package Timeline

13 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • 1.8.3Latest
    2026-02-11 · current release · diff ↗
  • 1.7.3
    2025-10-31 · diff ↗
  • 1.6.3
    2025-08-20 · diff ↗
  • 1.5.0
    2025-05-29 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 1.4.4
    2023-08-08 · diff ↗
  • 1.4.2
    2023-04-24 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 1.4.1
    2023-04-02 · diff ↗
  • 1.3.1
    2022-04-30 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 1.2.1
    2021-09-16 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
Show 7 earlier events
  • 1.0.2
    2020-03-13 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • 1.0.0
    2018-10-03 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 0.7.3
    2018-01-03 · diff ↗
  • 0.3.2
    2017-09-17
  • R
    R 3.4.0 released · 2017-04-21

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
Report a problem with this page →