Skip to content
L20wangPublic

About

Unified Rust-accelerated empirical econometrics suite for Stata (rfpermute, rfboot, rfbatch, rfcsdid, rfbjs, rfstack, rfpsm, rfroll, rfqreg)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

rfast — Unified Rust-Accelerated Empirical Econometrics Suite for Stata

rfast is a suite of 9 in-process, multi-threaded Stata commands powered by a single compiled native Rust plugin (rfast, SPI v3.0.0) using rayon. All parallel computations execute inside a single Stata session (zero external Stata worker processes, zero preserve/restore, zero per-iteration postfile disk I/O).

Commands Included

Command Replaces Core Algorithm & Acceleration
rfpermute permute Linear HDFE (FWL + MGS2 + BLOCK=16 multi-RHS) + in-process PPML-HDFE IRLS (null warm-start) + strata() & clusterperm() + on-demand VCE
rfboot boottest (HDFE) Wild Cluster Bootstrap (WCR / WCU, Rademacher / Webb / Mammen) with algebraic linearity trick for millisecond test-inversion CIs
rfbatch Loops over reghdfe/fereg Simultaneous multi-outcome FWL ((y1 y2 ...) d) + parallel Leave-One-Out (leaveone()) cluster/group sensitivity
rfcsdid csdid Callaway & Sant'Anna (2021) DR / OR / IPW + parallel (g,t) cells + exact Influence Function + vectorized Multiplier Bootstrap (simple/dynamic/group/calendar)
rfbjs did_imputation Borusyak, Jaravel & Spiess (2024) imputation DID on D == 0 + exact dual-weight conservative cluster variance + pre-trend Wald F-test
rfstack Manual Stacked DID Zero-copy cohort event-window slicing (unit#stack, time#stack) + FWL HDFE + cluster-robust SEs
rfpsm psmatch2 + reghdfe + bootstrap Logit IRLS + O(N log N) sorted NN/caliper/Epanechnikov kernel matching + weighted HDFE DID + end-to-end cluster bootstrap
rfroll rolling / asreg Parallel rolling & expanding window panel OLS (+ HC1 robust SEs) with direct SF_vstore writeback
rfqreg qregpd / bsqreg Conquer Gaussian-smoothed quantile regression (Barzilai-Borwein) + HDFE + Rayon cluster bootstrap

Installation

Install directly from GitHub inside Stata:

net install rfast, from("https://raw.githubusercontent.com/L20wang/rfast/main/") replace
rfast, selftest

Or download rfast-ssc.zip from GitHub Releases and install locally with net install rfast, from("<extracted_path>") replace.

License

MIT License — see LICENSE.

About

Unified Rust-accelerated empirical econometrics suite for Stata (rfpermute, rfboot, rfbatch, rfcsdid, rfbjs, rfstack, rfpsm, rfroll, rfqreg)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages