66[ ![ Tests] ( https://github.com/brycewang-stanford/statspai/workflows/CI%2FCD%20Pipeline/badge.svg )] ( https://github.com/brycewang-stanford/statspai/actions )
77[ ![ PyPI Downloads] ( https://static.pepy.tech/personalized-badge/statspai?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads )] ( https://pepy.tech/projects/statspai )
88
9- StatsPAI is a unified Python package for causal inference and applied econometrics. One ` import ` , 120 + functions, covering the complete empirical research workflow — from estimation to publication-ready tables in Word, Excel, and LaTeX.
9+ StatsPAI is a unified Python package for causal inference and applied econometrics. One ` import ` , 150 + functions, covering the complete empirical research workflow — from classical econometrics to cutting-edge ML/AI causal methods to publication-ready tables in Word, Excel, and LaTeX.
1010
1111It brings R's [ Causal Inference Task View] ( https://cran.r-project.org/web/views/CausalInference.html ) (fixest, did, rdrobust, gsynth, DoubleML, MatchIt, CausalImpact, ...) and Stata's core econometrics commands into a single, consistent Python API.
1212
@@ -111,6 +111,51 @@ It brings R's [Causal Inference Task View](https://cran.r-project.org/web/views/
111111| ` policy_tree() ` | Optimal treatment assignment rules | Athey & Wager (2021) |
112112| ` policy_value() ` | Policy value evaluation | — |
113113
114+ ### Conformal & Bayesian Causal Inference
115+
116+ | Function | Description | Reference |
117+ | --- | --- | --- |
118+ | ` conformal_cate() ` | Distribution-free prediction intervals for ITE | Lei & Candes (2021) |
119+ | ` bcf() ` | Bayesian Causal Forest (separate mu/tau) | Hahn, Murray & Carvalho (2020) |
120+
121+ ### Dose-Response & Multi-valued Treatment
122+
123+ | Function | Description | Reference |
124+ | --- | --- | --- |
125+ | ` dose_response() ` | Continuous treatment dose-response curve (GPS) | Hirano & Imbens (2004) |
126+ | ` multi_treatment() ` | Multi-valued treatment AIPW | Cattaneo (2010) |
127+
128+ ### Bounds & Partial Identification
129+
130+ | Function | Description | Reference |
131+ | --- | --- | --- |
132+ | ` lee_bounds() ` | Sharp bounds under sample selection | Lee (2009) |
133+ | ` manski_bounds() ` | Worst-case bounds (no assumption / MTR / MTS) | Manski (1990) |
134+
135+ ### Interference & Spillover
136+
137+ | Function | Description | Reference |
138+ | --- | --- | --- |
139+ | ` spillover() ` | Direct + spillover + total effect decomposition | Hudgens & Halloran (2008) |
140+
141+ ### Dynamic Treatment Regimes
142+
143+ | Function | Description | Reference |
144+ | --- | --- | --- |
145+ | ` g_estimation() ` | Multi-stage optimal DTR via G-estimation | Robins (2004) |
146+
147+ ### Bunching & Tax Policy
148+
149+ | Function | Description | Reference |
150+ | --- | --- | --- |
151+ | ` bunching() ` | Kink/notch bunching estimator with elasticity | Kleven & Waseem (2013) |
152+
153+ ### Matrix Completion (Panel)
154+
155+ | Function | Description | Reference |
156+ | --- | --- | --- |
157+ | ` mc_panel() ` | Causal panel data via nuclear-norm matrix completion | Athey et al. (2021) |
158+
114159### Other Causal Methods
115160
116161| Function | Description | Stata/R equivalent |
@@ -137,6 +182,7 @@ It brings R's [Causal Inference Task View](https://cran.r-project.org/web/views/
137182| ` mccrary_test() ` | Density discontinuity test | McCrary (2008) |
138183| ` hausman_test() ` | FE vs RE specification test | Hausman (1978) |
139184| ` anderson_rubin_test() ` | Weak instrument robust inference | Anderson & Rubin (1949) |
185+ | ` evalue() ` | E-value sensitivity to unmeasured confounding | VanderWeele & Ding (2017) |
140186| ` het_test() ` | Breusch-Pagan / White heteroskedasticity | — |
141187| ` reset_test() ` | Ramsey RESET specification test | — |
142188| ` vif() ` | Variance Inflation Factor | — |
@@ -298,7 +344,7 @@ sp.subgroup_analysis(df, formula="wage ~ education + experience",
298344## API at a Glance
299345
300346``` text
301- 120 public functions/classes
347+ 150+ public functions/classes
302348
303349Regression: regress, ivreg, panel, heckman, qreg, sqreg, tobit, xtabond
304350DID: did, did_2x2, callaway_santanna, sun_abraham, bacon_decomposition, honest_did
@@ -309,9 +355,17 @@ ML Causal: dml, causal_forest, deepiv, metalearner, tmle, aipw
309355Neural: tarnet, cfrnet, dragonnet
310356Discovery: notears, pc_algorithm
311357Policy: policy_tree, policy_value
358+ Conformal/Bayes:conformal_cate, bcf
359+ Dose-Response: dose_response
360+ Multi-Treat: multi_treatment
361+ Bounds: lee_bounds, manski_bounds
362+ Interference: spillover
363+ DTR: g_estimation
364+ Bunching: bunching
365+ Panel MC: mc_panel
312366Other: causal_impact, mediate, bartik
313367Post-est: margins, marginsplot, test, lincom
314- Diagnostics: oster_bounds, sensemakr, mccrary_test, hausman_test, het_test, reset_test, vif
368+ Diagnostics: oster_bounds, sensemakr, evalue, mccrary_test, hausman_test, het_test, reset_test, vif
315369Robustness: spec_curve, robustness_report, subgroup_analysis
316370Inference: wild_cluster_bootstrap, ri_test
317371Output: modelsummary, outreg2, sumstats, balance_table, tab, coefplot, binscatter
@@ -351,7 +405,7 @@ pytest
351405 author={Wang, Bryce},
352406 year={2025},
353407 url={https://github.com/brycewang-stanford/statspai},
354- version={0.2 .0}
408+ version={0.3 .0}
355409}
356410```
357411
0 commit comments