Skip to content

Commit 70dccaf

Browse files
docs(readme): add 'What StatsPAI is — and is not' positioning block
Preempts the 'isn't this just a wrapper?' critique with a concrete statement of what StatsPAI contributes beyond R/Stata/existing Python: - Independent re-implementation + citation transparency (not code copy) - Unified CausalResult across 390+ functions (R has 20+ S3 classes) - Scope breadth no single package matches (DID+RD+Synth+DML+Neural+...) - Agent-native schemas (list_functions/describe_function/function_schema) - Publication pipeline built in (Word/Excel/LaTeX/HTML/Markdown) Also surfaces the flagship DID estimators that were missing from the feature table: etwfe, drdid, stacked_did, ddd, cic, twfe_decomposition. Adds pyfixest-backed feols/fepois/feglm/etable to the regression table since they were just exposed at the top level. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a47634a commit 70dccaf

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@ It brings R's [Causal Inference Task View](https://cran.r-project.org/web/views/
4040

4141
---
4242

43+
## What StatsPAI is — and is not
44+
45+
StatsPAI is **not** a wrapper for R. We independently re-implement every algorithm from the original papers (with citations exposed via `.cite()`), and for a few mature engines (pyfixest, rdrobust) we use explicit, transparent bindings. What makes StatsPAI different is **the unifying layer on top**:
46+
47+
- **One result object, one API surface.** Every estimator — from `regress()` to `callaway_santanna()` to `causal_forest()` to `notears()` — returns a `CausalResult` with the same `.summary()` / `.plot()` / `.to_latex()` / `.cite()` interface. R users juggle 20+ incompatible S3 classes; StatsPAI users juggle one.
48+
- **Scope no single R or Python package matches.** DID + RD + Synth + Matching + DML + Meta-learners + TMLE + Neural Causal + Causal Discovery + Policy Learning + Conformal + Bunching + Spillover + Matrix Completion — all consistent, all under `sp.*`.
49+
- **Agent-native by design.** Self-describing schemas (`list_functions()`, `describe_function()`, `function_schema()`) make StatsPAI the first econometrics toolkit built for LLM-driven research workflows. No other package — in any language — offers this.
50+
- **Publication pipeline out of the box.** Word + Excel + LaTeX + HTML + Markdown export from every estimator, not a separate `modelsummary`-style dance.
51+
52+
If a method exists in R, we aim to match or exceed its feature set in Python — and then add what Python can uniquely offer (sklearn integration, JAX/PyTorch backends, agent-native schemas).
53+
54+
---
55+
4356
## Complete Feature List
4457

4558
### Regression Models
@@ -68,6 +81,10 @@ It brings R's [Causal Inference Task View](https://cran.r-project.org/web/views/
6881
| `liml()` | LIML (robust to weak IV) | `ivregress liml` | `AER::ivreg()` |
6982
| `jive()` | Jackknife IV (many instruments) |||
7083
| `lasso_iv()` | LASSO-selected instruments |||
84+
| `feols()` | OLS / IV with high-dim fixed effects (pyfixest backend) | `reghdfe` | `fixest::feols()` |
85+
| `fepois()` | Poisson with high-dim fixed effects | `ppmlhdfe` | `fixest::fepois()` |
86+
| `feglm()` | GLM with high-dim fixed effects || `fixest::feglm()` |
87+
| `etable()` | Publication-quality regression tables (LaTeX/Markdown/HTML) | `esttab` | `fixest::etable()` |
7188
| `sureg()` | Seemingly Unrelated Regression | `sureg` | `systemfit::systemfit("SUR")` |
7289
| `three_sls()` | Three-Stage Least Squares | `reg3` | `systemfit::systemfit("3SLS")` |
7390
| `biprobit()` | Bivariate probit | `biprobit` ||
@@ -156,6 +173,12 @@ It brings R's [Causal Inference Task View](https://cran.r-project.org/web/views/
156173
| `continuous_did()` | Continuous treatment DID (dose-response) | Callaway, Goodman-Bacon & Sant'Anna (2024) |
157174
| `did_multiplegt()` | DID with treatment switching | de Chaisemartin & D'Haultfoeuille (2020) |
158175
| `did_imputation()` | Imputation DID estimator | Borusyak, Jaravel & Spiess (2024) |
176+
| `wooldridge_did()` / `etwfe()` | Extended TWFE with cohort×post saturation | Wooldridge (2021) |
177+
| `drdid()` | Doubly robust 2×2 DID (OR + IPW) | Sant'Anna & Zhao (2020) |
178+
| `stacked_did()` | Stacked event-study DID | Cengiz et al. (2019); Baker, Larcker & Wang (2022) |
179+
| `ddd()` | Triple-differences (DDD) | Gruber (1994); Olden & Møen (2022) |
180+
| `cic()` | Changes-in-changes (quantile DID) | Athey & Imbens (2006) |
181+
| `twfe_decomposition()` | Bacon + de Chaisemartin–D'Haultfoeuille weights | Goodman-Bacon (2021); dCDH (2020) |
159182
| `distributional_te()` | Distributional treatment effects | Chernozhukov, Fernandez-Val & Melly (2013) |
160183
| `sp.aggte()` | Unified aggregation for staggered DID (simple/dynamic/group/calendar) with Mammen multiplier-bootstrap uniform bands | Callaway & Sant'Anna (2021) §4; Mammen (1993) |
161184
| `sp.cs_report()` | One-call Callaway–Sant'Anna report: estimation + four aggregations + pre-trend test + Rambachan–Roth breakdown M\* | CS2021 + RR2023 |

0 commit comments

Comments
 (0)