whatifbandit: Analyzing Randomized Experiments as Multi-Arm Bandits

Simulates the results of completed randomized controlled trials, as if they had been conducted as adaptive Multi-Arm Bandit (MAB) trials instead. Augmented inverse probability weighted estimation (AIPW), outlined by Hadad et al. (2021) <doi:10.1073/pnas.2014602118>, is used to robustly estimate the probability of success for each treatment arm under the adaptive design. Provides customization options to simulate perfect/imperfect information, stationary/non-stationary bandits, blocked treatment assignments, along with control augmentation, and other hybrid strategies for assigning treatment arms. The methods used in simulation were inspired by Offer-Westort et al. (2021) <doi:10.1111/ajps.12597>.

Version: 0.3.0
Depends: R (≥ 4.1.0)
Imports: bandit, data.table, dplyr, furrr, ggplot2, lubridate, purrr, randomizr, rlang, tibble, tidyr
Suggests: future, knitr, rmarkdown, testthat (≥ 3.0.0)
Published: 2025-11-03
DOI: 10.32614/CRAN.package.whatifbandit (may not be active yet)
Author: Noah Ochital ORCID iD [aut, cre, cph], Ryan T. Moore ORCID iD [ctb, cph]
Maintainer: Noah Ochital <noahochital at icloud.com>
BugReports: https://github.com/Noch05/whatifbandit/issues
License: GPL (≥ 3)
URL: https://github.com/Noch05/whatifbandit
NeedsCompilation: no
Materials: README, NEWS
CRAN checks: whatifbandit results

Documentation:

Reference manual: whatifbandit.html , whatifbandit.pdf
Vignettes: Introduction to '{whatifbandit}' (source, R code)

Downloads:

Package source: whatifbandit_0.3.0.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): not available, r-oldrel (arm64): not available, r-release (x86_64): not available, r-oldrel (x86_64): not available

Linking:

Please use the canonical form https://CRAN.R-project.org/package=whatifbandit to link to this page.