Wild Cluster Bootstrap, Causal Machine Learning (Double ML, Causal Forest) & High-Dimensional Inference
Family 15 (Resampling, Econometric ML & High-Dimensional Inference) addresses two central challenges in modern empirical economics: (1) valid finite-sample inference when clusters are few or unbalanced in size (such as 34 consolidated provinces or regional macro blocks), and (2) root- consistent causal estimation under high-dimensional or non-linear confounding.
In EcoLab, access these estimators under Modeling → 15. Bootstrap & Causal ML. See also the 16-Family Estimator Catalog.
When Should You Use Family 15?
- Wild Cluster Bootstrap (Cameron-Gelbach-Miller; Roodman-MacKinnon-Nielsen-Webb): When errors correlate within clusters and the number of clusters is modest (, or provinces with skewed cluster sizes), where conventional asymptotic cluster-robust standard errors over-reject true null hypotheses.
- Nonparametric Pairs, Moving-Block & Panel Cluster Bootstrap: When constructing valid standard errors and percentile-t confidence intervals for multi-step estimators (Heckman, Oaxaca-Blinder, DEA, ACF TFP) or serially dependent series.
- Double / Debiased Machine Learning (Chernozhukov et al., 2018): When estimating a low-dimensional causal parameter while partialling out dozens or hundreds of nuisance covariates via Lasso, Random Forests, or Gradient Boosting using Neyman-orthogonal scores and -fold cross-fitting.
- Generalized Random Forests / Causal Forest (Wager & Athey, 2018): When estimating heterogeneous Conditional Average Treatment Effects (CATE) with honest sample splitting and valid asymptotic confidence intervals.
- PCA, Exploratory Factor Analysis & Clustering: When constructing composite governance, financial-inclusion, or ESG indices and structural typologies prior to econometric estimation.
Structural Mathematical Specifications
1. Wild Restricted Cluster Bootstrap (boottest)
Imposing the null hypothesis , restricted cluster residuals () are perturbed by independent auxiliary weights (Rademacher or Webb's 6-point distribution when ):
Evaluating the empirical distribution of pivotal statistics delivers asymptotic refinement in finite cluster samples.
2. Neyman Orthogonalization in Double / Debiased ML (Partially Linear Model)
For the partially linear regression with :
where nuisance residuals and are predicted out-of-fold on , eliminating regularization and overfitting bias.
Identification Assumptions and Postestimation Diagnostics
- Auxiliary Weight Selection (Wild Bootstrap): Uses Rademacher weights for clusters and Webb 6-point weights when to prevent discrete enumeration collapse ( vs. ).
- Positivity Overlap & CATE Calibration (Double ML / Causal Forest): Audits propensity-score overlap , out-of-sample nuisance RMSE, and Best Linear Predictor (BLP) heterogeneity calibration tests.
- Sampling Adequacy (PCA / Factor): Reports Kaiser-Meyer-Olkin (), Bartlett's sphericity test, and cumulative explained variance shares.
Three-Language Replication Code Examples
- StataNow 19.5 MP
- R
- Python
* === 1. Wild Cluster Bootstrap With Rademacher / Webb Weights (boottest) ===
reghdfe grdp_growth public_inv fdi_ratio human_cap, absorb(prov_id year) vce(cluster prov_id)
boottest public_inv, cluster(prov_id) reps(9999) weighttype(rademacher) seed(2026)
* === 2. Double / Debiased Machine Learning Cross-Fit Partialing-Out ===
xporegress grdp_growth public_inv, controls(c.x1##c.x2 x3-x40) vce(cluster prov_id) rseed(2026)
# === 1. Fast Wild Cluster Bootstrap (fwildclusterboot + fixest) ===
library(fixest)
library(fwildclusterboot)
fe_fit <- feols(grdp_growth ~ public_inv + fdi_ratio + human_cap | prov_id + year,
cluster = ~prov_id, data = df)
boot_res <- boottest(fe_fit, clustid = "prov_id", param = "public_inv",
B = 9999, type = "rademacher")
summary(boot_res)
# === 2. Honest Causal Forest CATE Estimation (grf) ===
library(grf)
cf_fit <- causal_forest(X = as.matrix(df[, control_cols]), Y = df$y, W = df$treat, seed = 2026)
average_treatment_effect(cf_fit, target.sample = "all")
test_calibration(cf_fit)
# === Double / Debiased Machine Learning With K-Fold Cross-Fitting (doubleml) ===
import doubleml as dml
from sklearn.ensemble import RandomForestRegressor
dml_data = dml.DoubleMLData(df, y_col="grdp_growth", d_cols="public_inv", x_cols=control_cols)
ml_l = RandomForestRegressor(n_estimators=300, max_depth=8, random_state=2026)
ml_m = RandomForestRegressor(n_estimators=300, max_depth=8, random_state=2026)
dml_plr = dml.DoubleMLPLR(dml_data, ml_l=ml_l, ml_m=ml_m, n_folds=5)
dml_plr.fit()
print(dml_plr.summary)