build_backend() installs 'JAX' for AMD GPUs (ROCm) on Linux. It detects the
GPU from the amdgpu driver and installs the ROCm runtime from AMD's wheel
index, so no system ROCm installation is needed. Settings that some GPUs need
(HSA_OVERRIDE_GFX_VERSION_<node> for the RX 7600 series, and
ROCR_VISIBLE_DEVICES to hide an integrated GPU) are stored in the conda
environment and applied when the package loads 'JAX'. Previously, AMD
machines got CPU-only 'JAX'.backend argument of build_backend() ("auto", "cpu", "cuda",
"rocm", "metal") to override detection, for example to install CPU-only
'JAX' on a GPU machine. build_backend() now ends by reporting the device
'JAX' uses.conda env config vars in the environment are now applied
when the package loads 'JAX', as conda activate would.n_units >= 256). Every generated assignment,
Monte Carlo and exact, is now checked to contain exactly n_treated treated
units, with an informative error otherwise.NaN balance), and non-finite covariates are rejected.randomization_test() computes tau_obs in double precision and
re-evaluates candidates that tie it up to float32 error, so exact ties (such
as the observed assignment and, with equal group sizes, its complement) are
counted consistently. Candidates must be 0/1.a_min/a_max
arguments of jnp.clip.batch_size, which now defaults to NULL
(sized automatically). Set options(fastrerandomize.mc_fused = FALSE) to
dispatch batches from R (the default on Metal).randomization_test() uses the closed form
a_w + tau * (c_w - b_w) of each candidate's statistic, computed in one pass
over the candidates. It runs the same stochastic search and grid as before.fast_distance() metrics use a
matrix-product formulation on centered (and scaled or whitened) inputs.check_jax_availability() caches a successful check for the session, removing
about 0.7 s of conda overhead from every call.randomization_test(), 14x for
exact enumeration, and 8-80x for fast_distance(); first calls were also
faster. On CPU, randomization_test() with fiducial intervals was up to
110x faster.randomization_test() receives only candidate_randomizations_array,
the array is no longer copied back to R; the result stores it in
candidate_randomizations_array and sets candidate_randomizations to NULL.threshold_func call signature.alpha / 2, return
typed missing bounds when no grid point is accepted, and handle negative or
near-zero effects symmetrically in both JAX and pure-R implementations.c_initial a functional fiducial-search step-size control while
preserving the existing default scale.seed for Monte Carlo JAX streams.NULL.R2 is
supplied without sigma.tests/testthat/).R CMD check.skip_if_no_jax() helper for graceful skipping when JAX is unavailable.test-pure-r.R: Pure R implementation tests (always run)test-jax-integration.R: JAX-accelerated function teststest-distance.R: Distance metric teststest-edge-cases.R: Boundary condition testsAdded diagnose_rerandomization() function for pre-analysis evaluation of
rerandomization designs. This function helps researchers determine optimal
acceptance thresholds by computing:
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.
First release on CRAN with core functionality:
generate_randomizations(): Generate pools of acceptable randomizations
based on covariate balance.generate_randomizations_exact(): Exact enumeration for small experiments.generate_randomizations_mc(): Monte Carlo sampling for larger experiments.randomization_test(): Permutation-based inference with optional fiducial
intervals.build_backend(): Create conda environment with JAX and GPU support.check_jax_availability(): Verify JAX backend availability._R suffix functions) for environments
without JAX.print, summary, and plot methods for results objects.QJEData and YOPData.