{
  "_id": "6a1032a1acfb0bcc41c97aa7",
  "Package": "odr",
  "Type": "Package",
  "Title": "Optimal Design and Statistical Power for Experimental Studies\nInvestigating Main, Mediation, and Moderation Effects",
  "Version": "1.8.3",
  "Date": "2026-2-11",
  "Authors@R": "c(person(given = \"Zuchao\", \nfamily = \"Shen\",\nemail = \"zuchao.shen@gmail.com\",\nrole = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \"0000-0003-3483-0451\")),\nperson(given = \"Benjamin\",\nfamily = \"Kelcey\",\nrole = \"aut\"))",
  "Description": "Calculate the optimal sample size allocation that uses the\nminimum resources to achieve targeted statistical power in\nexperiments. Perform power analyses with and without\naccommodating costs and budget. The designs cover single-level\nand multilevel experiments detecting main, mediation, and\nmoderation effects (and some combinations). The references for\nthe proposed methods include: (1) Shen, Z., & Kelcey, B.\n(2020). Optimal sample allocation under unequal costs in\ncluster-randomized trials. Journal of Educational and\nBehavioral Statistics, 45(4): 446-474.\n<doi:10.3102/1076998620912418>. (2) Shen, Z., & Kelcey, B.\n(2022b). Optimal sample allocation for three-level multisite\ncluster-randomized trials. Journal of Research on Educational\nEffectiveness, 15 (1), 130-150.\n<doi:10.1080/19345747.2021.1953200>. (3) Shen, Z., & Kelcey, B.\n(2022a). Optimal sample allocation in multisite randomized\ntrials. The Journal of Experimental Education, 90(3), 693-711.\n<doi:10.1080/00220973.2020.1830361>. (4) Shen, Z., Leite, W.,\nZhang, H., Quan, J., & Kuang, H. (2025). Using ant colony\noptimization to identify optimal sample allocations in\ncluster-randomized trials. The Journal of Experimental\nEducation, 93(1), 167-185. <doi:10.1080/00220973.2024.2306392>.\n(5) Shen, Z., Li, W., & Leite, W. (in press). Statistical power\nand optimal design for randomized controlled trials\ninvestigating mediation effects. Psychological Methods.\n<doi:10.1037/met0000698>. (6) Champely, S. (2020). pwr: Basic\nfunctions for power analysis (Version 1.3-0) [Software].\nAvailable from <https://CRAN.R-project.org/package=pwr>.",
  "Language": "en-US",
  "License": "GPL-3",
  "Encoding": "UTF-8",
  "RoxygenNote": "7.3.3",
  "VignetteBuilder": "rmarkdown, knitr, markdown",
  "Repository": "https://zuchaoshen.r-universe.dev",
  "Date/Publication": "2026-02-11 15:54:25 UTC",
  "RemoteUrl": "https://github.com/zuchaoshen/odr",
  "RemoteRef": "HEAD",
  "RemoteSha": "199820882cfef85e879f0a6e3df1e198d4f71b81",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-12 08:36:17 UTC",
    "User": "root"
  },
  "Author": "Zuchao Shen [aut, cre] (ORCID: <https://orcid.org/0000-0003-3483-0451>),\nBenjamin Kelcey [aut]",
  "Maintainer": "Zuchao Shen <zuchao.shen@gmail.com>",
  "MD5sum": "4e942cae8b66acab0f8b4114951b44f3",
  "_user": "zuchaoshen",
  "_type": "src",
  "_file": "odr_1.8.3.tar.gz",
  "_fileid": "691b9c9604396b7ed4b4c640c596a1cde02f7183f552488d7a34025736bba26d",
  "_filesize": 744731,
  "_sha256": "691b9c9604396b7ed4b4c640c596a1cde02f7183f552488d7a34025736bba26d",
  "_created": "2026-05-12T08:36:17.000Z",
  "_published": "2026-05-22T10:40:33.865Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77363531534,
      "time": 136,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6939463337"
    },
    {
      "job": 77363531614,
      "time": 178,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6939477530"
    },
    {
      "job": 77363531772,
      "time": 105,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6939452912"
    },
    {
      "job": 77363531692,
      "time": 126,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6939459983"
    },
    {
      "job": 77363531313,
      "time": 167,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6939418088"
    },
    {
      "job": 77363531154,
      "time": 88,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7158557112"
    },
    {
      "job": 77363531767,
      "time": 148,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6939467259"
    },
    {
      "job": 77363531920,
      "time": 131,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6939461312"
    },
    {
      "job": 77363531760,
      "time": 103,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6939452580"
    }
  ],
  "_buildurl": "https://github.com/r-universe/zuchaoshen/actions/runs/25723070238",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/zuchaoshen/odr",
  "_commit": {
    "id": "199820882cfef85e879f0a6e3df1e198d4f71b81",
    "author": "Zuchao Shen <30952210+zuchaoshen@users.noreply.github.com>",
    "committer": "Zuchao Shen <30952210+zuchaoshen@users.noreply.github.com>",
    "message": "Merge branch 'master' of https://github.com/zuchaoshen/odr\n",
    "time": 1770825265
  },
  "_maintainer": {
    "name": "Zuchao Shen",
    "email": "zuchao.shen@gmail.com",
    "login": "zuchaoshen",
    "uuid": 30952210,
    "orcid": "0000-0003-3483-0451"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.3.0",
      "role": "Depends"
    },
    {
      "package": "stats",
      "version": ">= 3.0.0",
      "role": "Depends"
    },
    {
      "package": "graphics",
      "version": ">= 3.0.0",
      "role": "Depends"
    },
    {
      "package": "base",
      "version": ">= 3.0.0",
      "role": "Depends"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "markdown",
      "role": "Suggests"
    }
  ],
  "_owner": "zuchaoshen",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-22",
      "n": 3
    },
    {
      "week": "2025-32",
      "n": 12
    },
    {
      "week": "2025-44",
      "n": 2
    },
    {
      "week": "2026-07",
      "n": 3
    }
  ],
  "_tags": [
    {
      "name": "1.5.0",
      "date": "2025-05-29"
    },
    {
      "name": "1.8.3",
      "date": "2026-02-11"
    }
  ],
  "_stars": 0,
  "_contributors": [
    {
      "user": "zuchaoshen",
      "count": 39,
      "uuid": 30952210
    }
  ],
  "_userbio": {
    "uuid": 30952210,
    "type": "user",
    "name": "Zuchao Shen"
  },
  "_downloads": {
    "count": 235,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/odr"
  },
  "_devurl": "https://github.com/zuchaoshen/odr",
  "_searchresults": 21,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/odr.html",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/zuchaoshen/odr",
  "_realowner": "zuchaoshen",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.3.2",
      "date": "2017-09-17"
    },
    {
      "version": "0.7.3",
      "date": "2018-01-03"
    },
    {
      "version": "1.0.0",
      "date": "2018-10-03"
    },
    {
      "version": "1.0.2",
      "date": "2020-03-13"
    },
    {
      "version": "1.2.1",
      "date": "2021-09-16"
    },
    {
      "version": "1.3.1",
      "date": "2022-04-30"
    },
    {
      "version": "1.4.1",
      "date": "2023-04-02"
    },
    {
      "version": "1.4.2",
      "date": "2023-04-24"
    },
    {
      "version": "1.4.4",
      "date": "2023-08-08"
    },
    {
      "version": "1.5.0",
      "date": "2025-05-29"
    },
    {
      "version": "1.6.3",
      "date": "2025-08-20"
    },
    {
      "version": "1.7.3",
      "date": "2025-10-31"
    },
    {
      "version": "1.8.3",
      "date": "2026-02-16"
    }
  ],
  "_exports": [
    "gen.design.pars",
    "od.1",
    "od.1.111",
    "od.1.111m",
    "od.2",
    "od.2.221",
    "od.2.mod",
    "od.2m",
    "od.2m.111",
    "od.2m.mod",
    "od.2m.only.mod",
    "od.3",
    "od.3m",
    "od.4",
    "od.4m",
    "plot.power",
    "power.1",
    "power.1.111",
    "power.1.111m",
    "power.2",
    "power.2.221",
    "power.2.mod",
    "power.2m",
    "power.2m.111",
    "power.2m.mod",
    "power.3",
    "power.3m",
    "power.4",
    "power.4m",
    "re",
    "rpe"
  ],
  "_help": [
    {
      "page": "odr-package",
      "title": "Optimal Design and Statistical Power for Experimental Studies Investigating Main, Mediation, and Moderation Effects",
      "topics": [
        "odr-package",
        "odr"
      ]
    },
    {
      "page": "gen.design.pars",
      "title": "Generate optimal design parameters using ant colony optimization",
      "topics": [
        "gen.design.pars"
      ]
    },
    {
      "page": "od.1",
      "title": "Optimal sample allocation calculation for single-level experiments detecting main effects",
      "topics": [
        "od.1"
      ]
    },
    {
      "page": "od.1.111",
      "title": "Optimal sample allocation calculation for single-level randomized controlled trials (RCTs) investigating mediation effects (1-1-1)",
      "topics": [
        "od.1.111"
      ]
    },
    {
      "page": "od.1.111m",
      "title": "Jointly optimal sample allocation identification for single-level randomized controlled trials (RCTs) investigating main and moderation effects (1-1-1m)",
      "topics": [
        "od.1.111m"
      ]
    },
    {
      "page": "od.2",
      "title": "Optimal sample allocation calculation for two-level CRTs detecting main effects",
      "topics": [
        "od.2"
      ]
    },
    {
      "page": "od.2.221",
      "title": "Optimal sample allocation calculation for two-level CRTs probing mediation effects with cluster-level mediators",
      "topics": [
        "od.2.221"
      ]
    },
    {
      "page": "od.2.mod",
      "title": "Optimal sample allocation calculation for two-level CRTs probing moderation effects with cluster-level moderators",
      "topics": [
        "od.2.mod"
      ]
    },
    {
      "page": "od.2m",
      "title": "Optimal sample allocation calculation for two-level MRTs detecting main effects",
      "topics": [
        "od.2m"
      ]
    },
    {
      "page": "od.2m.111",
      "title": "Optimal sample allocation calculation for two-level multisite-randomized trials investigating mediation effects with individual-level mediators (1-1-1)",
      "topics": [
        "od.2m.111"
      ]
    },
    {
      "page": "od.2m.mod",
      "title": "Optimal sample allocation identification for two-level multisite randomized trials (MRTs) investigating main and moderation effects",
      "topics": [
        "od.2m.mod"
      ]
    },
    {
      "page": "od.2m.only.mod",
      "title": "Using the first-order derivative method to identify the optimal sample allocations for moderation effects in two-level multisite randomized trials (MRTs)",
      "topics": [
        "od.2m.only.mod"
      ]
    },
    {
      "page": "od.3",
      "title": "Optimal sample allocation calculation for three-level CRTs detecting main effects",
      "topics": [
        "od.3"
      ]
    },
    {
      "page": "od.3m",
      "title": "Optimal sample allocation calculation for three-level MRTs detecting main effects",
      "topics": [
        "od.3m"
      ]
    },
    {
      "page": "od.4",
      "title": "Optimal sample allocation calculation for four-level CRTs detecting main effects",
      "topics": [
        "od.4"
      ]
    },
    {
      "page": "od.4m",
      "title": "Optimal sample allocation calculation for four-level MRTs detecting main effects",
      "topics": [
        "od.4m"
      ]
    },
    {
      "page": "plot.power",
      "title": "Plot statistical power curves under a fixed budget across optimal design parameters",
      "topics": [
        "plot.power"
      ]
    },
    {
      "page": "power.1",
      "title": "Budget and/or sample size, power, MDES calculation for single-level experiments detecting main effects",
      "topics": [
        "power.1"
      ]
    },
    {
      "page": "power.1.111",
      "title": "Budget and/or sample size, power, MDES calculation for single-level randomized controlled trials (RCTs) investigating mediation effects",
      "topics": [
        "power.1.111"
      ]
    },
    {
      "page": "power.1.111m",
      "title": "Budget and/or sample size, power, MDES calculation for single-level randomized controlled trials (RCTs) investigating moderation effects (1-1-1m)",
      "topics": [
        "power.1.111m"
      ]
    },
    {
      "page": "power.2",
      "title": "Budget and/or sample size, power, MDES calculation for two-level CRTs detecting main effects",
      "topics": [
        "power.2"
      ]
    },
    {
      "page": "power.2.221",
      "title": "Budget and/or sample size, power calculation for CRTs probing mediation effects with cluster-level mediators",
      "topics": [
        "power.2.221"
      ]
    },
    {
      "page": "power.2.mod",
      "title": "Statistical power, sample size (and/or budget), minimum detectable moderator effect size calculation for two-level cluster-randomized trials (CRTs) detecting moderation effects",
      "topics": [
        "power.2.mod"
      ]
    },
    {
      "page": "power.2m",
      "title": "Budget and/or sample size, power, MDES calculation for two-level MRTs detecting main effects",
      "topics": [
        "power.2m"
      ]
    },
    {
      "page": "power.2m.111",
      "title": "Budget and/or sample size, power, MDES calculation for MRTs investigating mediation effects with individual-level mediators",
      "topics": [
        "power.2m.111"
      ]
    },
    {
      "page": "power.2m.mod",
      "title": "Statistical power, sample size (and/or budget), minimum detectable moderator effect size calculation for two-level multisite randomized trials (MRTs) detecting moderation effects",
      "topics": [
        "power.2m.mod"
      ]
    },
    {
      "page": "power.3",
      "title": "Budget and/or sample size, power, MDES calculation for three-level CRTs detecting main effects",
      "topics": [
        "power.3"
      ]
    },
    {
      "page": "power.3m",
      "title": "Budget and/or sample size, power, MDES calculation for three-level MRTs detecting main effects",
      "topics": [
        "power.3m"
      ]
    },
    {
      "page": "power.4",
      "title": "Budget and/or sample size, power, MDES calculation for four-level CRTs detecting main effects",
      "topics": [
        "power.4"
      ]
    },
    {
      "page": "power.4m",
      "title": "Budget and/or sample size, power, MDES calculation for four-level MRTs detecting main effects",
      "topics": [
        "power.4m"
      ]
    },
    {
      "page": "re",
      "title": "Relative efficiency (RE) calculation",
      "topics": [
        "re"
      ]
    },
    {
      "page": "rpe",
      "title": "Relative precision and efficiency (RPE) calculation",
      "topics": [
        "rpe"
      ]
    }
  ],
  "_rundeps": [],
  "_vignettes": [
    {
      "source": "odr.Rmd",
      "filename": "odr.html",
      "title": "Package 'odr'",
      "author": "Zuchao Shen & Benjamin Kelcey",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. Optimal Design Parameters",
        "2. Designs Detecting Main Effects",
        "Designs and Functions",
        "Rules for Function Names",
        "Functions",
        "od function",
        "power function",
        "re function",
        "plot.power function",
        "3. Designs Detecting Mediation Effects",
        "4. Designs Detecting Moderation (and Main) Effects",
        "5. Examples for Main Effects",
        "Function od",
        "Function plot.power",
        "Function power",
        "Examples of power analyses accommodating cost structures (cost.model = TRUE)",
        "Required budget for desired power",
        "Statistical power under a fixed budget",
        "Minimum detectable effect size under a fixed budget",
        "Examples of conventional power analyses (cost.model = FALSE)",
        "Examples of conventional power curves",
        "Examples for other types of trials",
        "Function re",
        "6. Examples for Mediation Effects",
        "7. Examples for Moderation Effects"
      ],
      "created": "2021-08-29 19:34:22",
      "modified": "2026-02-11 15:42:59",
      "commits": 9
    }
  ],
  "_score": 3.924279286061882,
  "_indexed": true,
  "_nocasepkg": "odr",
  "_universes": [
    "zuchaoshen"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.8.3",
      "date": "2026-05-12T08:38:22.000Z",
      "distro": "noble",
      "commit": "199820882cfef85e879f0a6e3df1e198d4f71b81",
      "fileid": "8b7481b12379bdb47604148b6c6ce8a22503ecca83faf8bdf01eb1a29f2a7b58",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/zuchaoshen/actions/runs/25723070238"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.8.3",
      "date": "2026-05-12T08:39:04.000Z",
      "distro": "noble",
      "commit": "199820882cfef85e879f0a6e3df1e198d4f71b81",
      "fileid": "a53b466512d6ebaf7817e8d3ffbf40bdc50513b845ad212e41d0c8578d96e290",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/zuchaoshen/actions/runs/25723070238"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.8.3",
      "date": "2026-05-12T08:38:02.000Z",
      "commit": "199820882cfef85e879f0a6e3df1e198d4f71b81",
      "fileid": "88c62eff269d486827e3a42ed664af498ef981fba24f9139455a44a820ee40f3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/zuchaoshen/actions/runs/25723070238"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.8.3",
      "date": "2026-05-12T08:38:12.000Z",
      "commit": "199820882cfef85e879f0a6e3df1e198d4f71b81",
      "fileid": "b4f74834df25e451ec2184f8ecb68a54d67db4c3bbc55fc5931ae2defe4f78b5",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/zuchaoshen/actions/runs/25723070238"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.8.3",
      "date": "2026-05-12T08:38:19.000Z",
      "commit": "199820882cfef85e879f0a6e3df1e198d4f71b81",
      "fileid": "4b4ff784d425b9b3fcdbcedf54db9e09de2756d1ce9d39c54c32c8350da2e93c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/zuchaoshen/actions/runs/25723070238"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.8.3",
      "date": "2026-05-12T08:38:11.000Z",
      "commit": "199820882cfef85e879f0a6e3df1e198d4f71b81",
      "fileid": "ae5ae0c1db035284eff5c2efa882fe7b97145c45a52147c033a1e2c5703938fd",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/zuchaoshen/actions/runs/25723070238"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.8.3",
      "date": "2026-05-12T08:37:42.000Z",
      "commit": "199820882cfef85e879f0a6e3df1e198d4f71b81",
      "fileid": "95ef28feaa8a59991698363fa0cb4e57d50c3904adafc0d875a4a085c70b8450",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/zuchaoshen/actions/runs/25723070238"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.8.3",
      "date": "2026-05-22T10:40:14.000Z",
      "commit": "199820882cfef85e879f0a6e3df1e198d4f71b81",
      "fileid": "986fd5f41a1264d77f790e538fae6b60ef82a1af97e331904a423a028ecf9aa3",
      "status": "success",
      "buildurl": "https://github.com/r-universe/zuchaoshen/actions/runs/25723070238"
    }
  ]
}