Skip to content

fastrerandomize

0.3Package record

Hardware-Accelerated Rerandomization for Improved Balance

0packages depend
2.4Kdownloads / year
–test coverage
13/13flavors OK

Overview

About

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.

Changes in 0.3

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) for fastrerandomize_diagnostic class 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

CRAN checks
13OK
Slowest check: 3.1 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.3
READMENoVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 0.3Citation fileYes · software entry onlyWebsitenot declared in DESCRIPTION
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

2.4K
CRAN downloads in the past year
Rank #18,026 · ~7/day · ~198/mo
Daily download trend is not available in this view yet.
28430 days
72290 days
2.4K1 year
Compare downloads with other packages →
Also on104 r2u4 autocran

Repository

8Stars
1Forks
9Open issues
0Open PRs
0Releases
374Commits
17Commit identities
hardware-accelerationaccelerated-computingdistance-measuresrerandomizationapple-siliconcausal-inferencecovariate-balancecuda
374 commits · Last activity 2026-10-22 · 0% stars, 30d
Responsiveness
How these are sampled
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

2025-01-30 · 82026-07-07 · 8
PracticesBeta

Checks run against github.com/cjerzak/fastrerandomize-software on 2026-10-22.

No development-tooling practices detected in the upstream repository.

How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Codexfirst seen 2025-06-02
    Pull request it wrote: opened by a project member
  • Claude Codefirst seen 2025-12-09
    Named in .gitignore: CLAUDE.md
    Commits: at least 5 crediting it in the message
Models named in its commits
  • Claude Opus 5.55 commits · Oct 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)

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.

Depends (1)
R >= 3.5.0
Imports (5)
reticulateassertthatutilsstatsgraphics
LinkingTo (0)
none
Suggests (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (4)
Author, Maintainer since 0.1 (2025)
Releases (3)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.3Latest
    record
    2025-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
  • R
    R 4.5.0 released · 2025-04-11
  • 0.2
    record
    2025-01-14 · diff ↗
  • 0.1
    record
    2025-01-13
  • R
    R 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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for fastrerandomize version 0.3 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy