New to rerandomization? See the Tutorials "Key Concepts" box for the acceptance rule (M ≤ a), acceptance probability q, and design-respecting inference.
Install fastrerandomize
To install and load fastrerandomize, follow these steps:
-
Open your preferred R editor.
-
If you haven't installed devtools already, begin by doing so:
install.packages("devtools") -
Install the latest package version from GitHub (a CRAN version is also available):
devtools::install_github("cjerzak/fastrerandomize-software", subdir = "fastrerandomize") -
Load the package:
library(fastrerandomize) -
When running code for the first time, create the computational environment:
fastrerandomize::build_backend() -
Rerandomize!
Installation Tips
- Ensure you have R version 4.3 or higher installed.
- System requirements: Python 3.11+ plus reticulate, JAX/JAXLIB, and NumPy (installed by the backend).
build_backend()creates a minimal conda environment and selects CPU/GPU/TPU automatically.- If you encounter any errors during installation, open an issue on GitHub.
- For GPU acceleration, ensure compatible CUDA (NVIDIA) or Metal (Apple) drivers are installed.
Citation
Reference the SoftwareX article
Connor T. Jerzak, Rebecca Goldstein, Aniket Kamat, and Fucheng Warren Zhu. FastRerandomize: An R Package for Fast Rerandomization Using Accelerated Computing. SoftwareX, 2026.
@article{jerzak2025fastrerandomize,
title={FastRerandomize: An R Package for Fast Rerandomization Using Accelerated Computing},
author={Jerzak, Connor T. and Rebecca Goldstein and Aniket Kamat and Fucheng Warren Zhu},
journal={SoftwareX},
year={2026}
}