MyNixOS website logo
Description

Power Analysis Tools for Multilevel Randomized Experiments.

Includes tools to calculate statistical power, minimum detectable effect size (MDES), MDES difference (MDESD), and minimum required sample size for various multilevel randomized experiments (MRE) with continuous outcomes. Accomodates 14 types of MRE designs to detect main treatment effect, seven types of MRE designs to detect moderated treatment effect (2-1-1, 2-1-2, 2-2-1, 2-2-2, 3-3-1, 3-3-2, and 3-3-3 designs; <total.lev> - <trt.lev> - <mod.lev>), five types of MRE designs to detect mediated treatment effects (2-1-1, 2-2-1, 3-1-1, 3-2-1, and 3-3-1 designs; <trt.lev> - <med.lev> - <out.lev>), four types of partially nested (PN) design to detect main treatment effect, and three types of PN designs to detect mediated treatment effects (2/1, 3/1, 3/2; <trt.arm.lev> / <ctrl.arm.lev>). See 'PowerUp!' Excel series at <https://www.causalevaluation.org/>.

Power Analysis Tools for Multilevel Randomized Experiments

To install and load the library

install.packages("PowerUpR")
library(PowerUpR)

Statistical power, minimum detectable effect size (MDES), MDES difference (MDESD), or minimum required sample size (MRSS) can be requested by using the relevant function given design parameters. In general, each function begins with an output name, follows by a period, and ends with a design name in the form <output>.<design>(). There are three types of output; mdes for main effects (mdes or mdesd for moderation effects), power, and mrss. Each output can be requested for eighteen types of designs to detect main treatment effect; ira, ira_pn, bira2, bira2_pn, bira2f1, bira2c1, cra2, cra2_pn, bira3, bcra3r2, bcra3r2_pn, bcra3f2, cra3, bira4, bcra4r2, bcra4r3, bcra4f3, cra4, and seven types of designs to detect moderator effects; mod211, mod212, mod221, mod222, mod331, mod332, and mod333. To detect mediator effects, only power can be requested for seven types of designs; med211, med221, med331, med321, med311, med_pn21, med_pn31, and med_pn32.

For designs to detect main effects, first three letters stand for the type of assignment; for individual random assignment ira, for blocked individual random assignment bira, for cluster random assignment cra, and for blocked cluster random assignment bcra. First (or the only number) indicate total number of levels. The single letter inbetween refers to whether the top level is random or fixed. Partially nested designs are denoted with pn.

Naming conventions are slighlty different for designs to detect moderator and mediator effects. Numbers following mod keyword indicate total number of levels, the level at which randomization takes place, and the level at which moderator resides correspondingly. As for the mediator effects, numbers following med keyword indicate the level at which treatment, mediator and outcome variables reside.

For example, the function mdes.cra2() can be called to calculate MDES for the main treatment effect in a two-level cluster-randomized trial. Similiarly, the function mdesd.mod222() can be called to calculate MDESD for moderator effect residing at level 2 in a two-level cluster-randomized trial. Finally, the function power.med221() can be called to calculate statistical power for mediator residing at level 2 in a two-level cluster-randomized trial.

Live app at:
https://powerupr.shinyapps.io/index/

Acknowledgement:

This work is supported by National Science Foundation through a collaborative research grant titiled “Power Analyses for Moderator and Mediator Effects in Cluster Randomized Trials” to Benjamin Kelcey (Award Number: 1437679), Jessaca Spybrook (Award Number:1437692), and Nianbo Dong (Award Number: 1437745).

Metadata

Version

1.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows