Package: fastrerandomize 0.4

fastrerandomize: Hardware-Accelerated Rerandomization for Improved Balance

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>.

Authors:Fucheng Warren Zhu [aut], Aniket Sachin Kamat [aut], Connor Jerzak [aut, cre], Rebecca Goldstein [aut]

fastrerandomize_0.4.tar.gz
fastrerandomize_0.4.zip(r-4.7)fastrerandomize_0.4.zip(r-4.6)fastrerandomize_0.4.zip(r-4.5)
fastrerandomize_0.4.tgz(r-4.6-any)fastrerandomize_0.4.tgz(r-4.5-any)
fastrerandomize_0.4.tar.gz(r-4.7-any)fastrerandomize_0.4.tar.gz(r-4.6-any)
fastrerandomize_0.4.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
fastrerandomize/json (API)
NEWS

# Install 'fastrerandomize' in R:
install.packages('fastrerandomize', repos = c('https://cjerzak.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/cjerzak/fastrerandomize-software/issues

Datasets:
  • QJEData - QJEData: Agricultural Treatment Experiment Data
  • YOPData - YOPData

On CRAN:

Conda:

accelerated-computingbalancedistance-measureshardware-accelerationrerandomization

5.64 score 8 stars 5 scripts 126 downloads 17 exports 13 dependencies

Last updated from:b26239114a. Checks:7 ERROR, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64ERROR137
source / vignettesOK255
linux-release-x86_64ERROR148
macos-release-arm64ERROR128
macos-oldrel-arm64ERROR95
windows-develERROR124
windows-releaseERROR112
windows-oldrelERROR104
wasm-releaseOK110

Exports:build_backendcheck_jax_availabilitycompute_diff_at_tau_for_oneW_Rdiagnose_rerandomizationdiff_in_means_Rfast_distancefastrerandomize_classfastrerandomize_testfind_fiducial_interval_Rgenerate_randomizationsgenerate_randomizations_exactgenerate_randomizations_mcgenerate_randomizations_RhotellingT2_Rprint2randomization_testrandomization_test_R

Dependencies:assertthatherejsonlitelatticeMatrixpngrappdirsRcppRcppTOMLreticulaterlangrprojrootwithr

FastRerandomize Package Tutorial

Rendered fromMainVignette.rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2025-12-22
Started: 2025-01-02

Readme and manuals

Help Manual

Help pageTopics
A function to build the environment for fastrerandomize. Builds a conda environment in which 'JAX' and 'np' are installed. Users can also create a conda environment where 'JAX' and 'np' are installed themselves.build_backend
Check if 'Python' and 'JAX' are availablecheck_jax_availability
Compute potential outcome difference in means for a single assignment under a hypothesized tau in base Rcompute_diff_at_tau_for_oneW_R
Diagnostic map from observed (or targeted) balance to precision and stringencydiagnose_rerandomization
Simple difference in means in base Rdiff_in_means_R
JAX-accelerated distance calculationsfast_distance
Constructor for fastrerandomize randomizationsfastrerandomize_class
Constructor for fastrerandomize randomization test objectsfastrerandomize_test
Fiducial interval logic in base R, for randomization testfind_fiducial_interval_R
Generate randomizations for a rerandomization-based experimental designgenerate_randomizations
Generate Complete Randomizations with Optional Balance Constraintsgenerate_randomizations_exact
Draws a random sample of acceptable randomizations from all possible complete randomizations using Monte Carlo samplinggenerate_randomizations_mc
Generate randomizations in base R, filtering by Hotelling's T^2 acceptancegenerate_randomizations_R
Compute Hotelling's T-squared statistic in base RhotellingT2_R
Plot method for fastrerandomize_randomizations objectsplot.fastrerandomize_randomizations
Plot method for fastrerandomize_test objectsplot.fastrerandomize_test
Print method for fastrerandomize_randomizations objectsprint.fastrerandomize_randomizations
Print method for fastrerandomize_test objectsprint.fastrerandomize_test
Print timestamped messages with optional quietingprint2
QJEData: Agricultural Treatment Experiment DataQJEData
Fast randomization testrandomization_test
Base R randomization test: difference in means + optional fiducial intervalrandomization_test_R
Summary method for fastrerandomize_randomizations objectssummary.fastrerandomize_randomizations
Summary method for fastrerandomize_test objectssummary.fastrerandomize_test
YOPDataYOPData