fastrerandomize-software
FastRerandomize: An R Package for Ultra-fast Rerandomization Using Accelerated Computing
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.8%) to scientific vocabulary
Keywords
Repository
FastRerandomize: An R Package for Ultra-fast Rerandomization Using Accelerated Computing
Basic Info
- Host: GitHub
- Owner: cjerzak
- License: other
- Language: R
- Default Branch: main
- Homepage: https://arxiv.org/abs/2501.07642
- Size: 18.9 MB
Statistics
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 9
- Releases: 0
Topics
Metadata Files
README.md
fastrerandomize: An R Package for Ultra-Fast Rerandomization Using Accelerated Computing
What is fastrerandomize?
| Installation
| Tutorial
| Data
| CRAN
| References
| Documentation
Note: fastrerandomize has been successfully tested on CPU, CUDA, and METAL frameworks. Special thanks to Aniket Kamat and Fucheng Warren Zhu for their work on the latest package build!
What is fastrerandomize?
The fastrerandomize contains functions such as randomization_test, which offers a streamlined approach for performing randomization tests after using rerandomization in the research design.
We employ a JAX backend to make exact rerandomization inference possible even for larger experiments where the number of randomizations is in the hundreds of millions or where experimenters seek to maintain balanced randomizations across thousands of features.
Package Installation and Loading
```
Install fastrerandomize stable version from CRAN
install.packages("fastrerandomize")
Install fastrerandomize development version from GitHub
devtools::install_github(repo = "cjerzak/fastrerandomize-software/fastrerandomize")
Load the package
library( fastrerandomize )
Running code the first time, you'll want to create the computational environment
fastrerandomize::build_backend() ```
Tutorial
Let's get started with a tutorial. We're first going to use the package to generate a pool of acceptable rerandomizations. ```
First, specify some analysis parameters
nunits <- 20; ntreated <- 10
Generate covariate data
X <- matrix(rnorm(nunits*5),nrow = nunits)
Generate a set of acceptable randomizations based on randomizationacceptprob.
When randomizationacceptprob = 1, all randomizations are accepted.
When randomizationacceptprob < 1, only well-balanced randomizations are accepted.
When randomizationacceptprob = 1/|Size of cand. randomization set|, 1 randomization is accepted.
candidaterandomizations <- fastrerandomize::generaterandomizations( nunits = nunits, ntreated = ntreated, X = X, randomizationacceptprob = 0.001)
Check out the candidate randomization dimensions
dim( candidate_randomizations )
We can also use `fastrerandomize` to perform a randomization test using those acceptable randomizations.
Setup simulated outcome data
CoefY <- rnorm(ncol(X)) Wobs <- candidaterandomizations[1,] tautrue <- 1 Yobs <- c(X %% as.matrix(CoefY) + Wobstautrue + rnorm(nunits, sd = 0.1))
Perform exact randomization set based on accepted randomizations
ExactRandomizationTestResults <- fastrerandomize::randomizationtest( obsW = Wobs, obsY = Yobs, candidaterandomizations = candidaterandomizations, findFI = F # set to T if an exact fiducial interval needed ) ExactRandomizationTestResults$pvalue # p-value ExactRandomizationTestResults$tau_obs # difference-in-means ATE estimate ```
Replication Data
Replication data for the package is available using the data command.
data( QJEData )
data( YOPData )
Development
We welcome new features or bug fixes (you can raise an issue or submit a pull request in the repository). We will keep the package up-to-date with the latest version of the JAX backend.
References
Connor T. Jerzak, Rebecca Goldstein, Aniket Kamat, Fucheng Warren Zhu. fastrerandomize: An R Package for Fast Rerandomization Using Accelerated Computing. ArXiv Preprint, 2025. [PDF]
@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={ArXiv Preprint},
year={2025}
}
Connor T. Jerzak and Rebecca Goldstein. "Degrees of Randomness in Rerandomization Procedures." ArXiv Preprint, 2023. [PDF]
@article{JerGol2023,
title={Degrees of Randomness in Rerandomization Procedures},
author={Jerzak, Connor T. and Rebecca Goldstein},
journal={ArXiv Preprint},
year={2023}}
_
_
_
Key to minimize memory overhead

_
Owner
- Name: Connor Jerzak
- Login: cjerzak
- Kind: user
- Location: Austin, Texas
- Company: The University of Texas at Austin
- Website: ConnorJerzak.com
- Twitter: jerzakconnor
- Repositories: 3
- Profile: https://github.com/cjerzak
Asst. Prof. at UT Austin. Thinking about the future of AI, quantitative methodology, causal inference, social science+more→arXiv:2206.06417, arXiv:2301.12985
GitHub Events
Total
- Issues event: 42
- Watch event: 3
- Issue comment event: 31
- Member event: 2
- Push event: 205
- Pull request event: 7
- Create event: 1
Last Year
- Issues event: 42
- Watch event: 3
- Issue comment event: 31
- Member event: 2
- Push event: 205
- Pull request event: 7
- Create event: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 9
- Total pull requests: 2
- Average time to close issues: about 2 months
- Average time to close pull requests: 1 minute
- Total issue authors: 2
- Total pull request authors: 1
- Average comments per issue: 0.33
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 9
- Pull requests: 2
- Average time to close issues: about 2 months
- Average time to close pull requests: 1 minute
- Issue authors: 2
- Pull request authors: 1
- Average comments per issue: 0.33
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- WarrenZhu050413 (19)
- cjerzak (7)
Pull Request Authors
- WarrenZhu050413 (3)
- cjerzak (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 184 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: fastrerandomize
Hardware-Accelerated Rerandomization for Improved Balance
- Homepage: https://github.com/cjerzak/fastrerandomize-software
- Documentation: http://cran.r-project.org/web/packages/fastrerandomize/fastrerandomize.pdf
- License: GPL-3
-
Latest release: 0.2
published about 1 year ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.3.3 depends
- reticulate * imports


