Hardware-Accelerated Rerandomization for Improved Balance
Overview
Provides hardware-accelerated tools for performing rerandomization and randomization testing in experimental research. Using a 'JAX' backend, the package enables exact rerandomization inference even for large experiments with hundreds of billions of possible randomizations. Key functionalities include generating pools of acceptable rerandomizations based on covariate balance, conducting exact randomization tests, and performing pre-analysis evaluations to determine optimal rerandomization acceptance thresholds. The package supports various hardware acceleration frameworks including 'CPU', 'CUDA', and 'METAL', making it versatile across accelerated computing environments. This allows researchers to efficiently implement stringent rerandomization designs and conduct valid inference even with large sample sizes. The package is partly based on Jerzak and Goldstein (2023) doi:10.48550/arXiv.2310.00861.
New Features
- Added
diagnose_rerandomization()function for pre-analysis evaluation of rerandomization designs. This function helps researchers determine optimal acceptance thresholds by computing: - Expected number of acceptable randomizations
- Minimum balance criterion values
- Power analysis for different threshold choices
- Added
fast_distance()function for hardware-accelerated pairwise distance computation supporting multiple metrics: Euclidean, Manhattan, Mahalanobis, cosine, and correlation-based distances. - Added S3 methods (
print,summary,plot) forfastrerandomize_diagnosticclass to visualize and summarize diagnostic results.
Show all changes in 0.3Hide the rest of the changes in 0.3
Improvements
- Updated JAX backend to support CUDA 12 and CUDA 13.
- Improved documentation throughout the package.
- Various bug fixes and performance improvements.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 25
- Examples that run
- 22%2 run in a plain check · 7 never run
- Exported functions with examples
- 53%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 4%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 29
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Issues over time
Commits over time
Checks run against github.com/cjerzak/fastrerandomize-software on 2026-10-22.
No development-tooling practices detected in the upstream repository.
This repository shows signs of AI coding tools.
- Codexfirst seen 2025-06-02Pull request it wrote: opened by a project member
- Claude Codefirst seen 2025-12-09Named in .gitignore: CLAUDE.mdCommits: at least 5 crediting it in the message
- Claude Opus 5.55 commits · Oct 2026
Dependencies
Installing fastrerandomize adds 11 packages (7 with compiled code, 5.5 MB of source tarballs). Heaviest: Rcpp 1.8 MB, reticulate 1.6 MB, jsonlite 1.0 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 0.3Latest2025-12-22 · current release · diff ↗ ·
added 8 exports
compute_diff_at_tau_for_oneW_R, diagnose_rerandomization, diff_in_means_R, fast_distance, find_fiducial_interval_R, generate_randomizations_R, hotellingT2_R, randomization_test_R - RR 4.5.0 released · 2025-04-11
- 0.22025-01-14 · diff ↗
- 0.12025-01-13
- RR 4.4.0 released · 2024-04-24
Package metadata
- First published
- 2025-01-13
- Total releases
- 3 / 1 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 1.8 MB / 3 files
- Download size
- 1.9 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("fastrerandomize")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.32614/cran.package.fastrerandomize.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.