pipeline
Classical end-to-end empirical analysis workflow in the traditional Python econometric stack — pandas + numpy + scipy + statsmodels + linearmodels + pyfixest +…
Statistical modeling: OLS/WLS/GLS, GLM (logit, probit, Poisson), time series (ARIMA, VAR), mixed effects, diagnostics. Formula API. Use for regressions without fixed effects, GLMs, or time series. For FE/DiD use pyfixest; panel/IV use linearmodels.
$ npx -y skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill statsmodels --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/statsmodelsContext preview
The summary Claude sees to decide when to auto-load this skill.
Statistical modeling: OLS/WLS/GLS, GLM (logit, probit, Poisson), time series (ARIMA, VAR), mixed effects, diagnostics. Formula API. Use for regressions without fixed effects, GLMs, or time series. For FE/DiD use pyfixest; panel/IV use linearmodels.
name: statsmodels description: >- Statistical modeling: OLS/WLS/GLS, GLM (logit, probit, Poisson), time series (ARIMA, VAR), mixed effects, diagnostics. Formula API. Use for regressions without fixed effects, GLMs, or time series. For FE/DiD use pyfixest; panel/IV use linearmodels. metadata: audience: research-coders domain: python-library library-version: "0.14.6" skill-last-updated: "2026-03-27"
statsmodels general-purpose statistical modeling library for Python. Covers OLS/WLS/GLS, GLM (logit, probit, Poisson, negative binomial), discrete choice models, time series (ARIMA, SARIMAX, VAR), mixed effects (MixedLM), robust regression, hypothesis tests, and comprehensive diagnostics. Supports R-style formula API. Use when fitting regressions without fixed effects, running GLMs or logit/probit, analyzing time series, or using formula syntax. For fixed effects or DiD, use pyfixest; for panel/IV/system models, use linearmodels.
Comprehensive skill for statistical modeling with statsmodels. Use decision trees below to find the right guidance, then load detailed references.
statsmodels is the general-purpose **statistical modeling** library for Python:
| File | Purpose | When to Read | |------|---------|--------------| | `quickstart.md` | Installation, formula vs array API, first model | Starting with statsmodels | | `linear-models.md` | OLS, WLS, GLS, robust regression, quantile regression | Fitting linear models | | `glm-discrete.md` | GLM families, logit/probit, count models, zero-inflated | Non-linear models, binary/count outcomes | | `time-series.md` | ARIMA, SARIMAX, VAR, exponential smoothing, unit root tests | Analyzing temporal data | | `diagnostics.md` | Heteroskedasticity, normality, VIF, influence, residuals | Checking model assumptions | | `hypothesis-testing.md` | t-tests, F-tests, Wald tests, multiple comparisons | Testing coefficients and comparing models | | `gotchas.md` | Constant term, convergence, predict pitfalls, pyfixest boundary | Debugging issues |
1. **New to statsmodels?** Start with `quickstart.md` then `linear-models.md` 2. **Need GLM or logit/probit?** Read `quickstart.md` then `glm-discrete.md` 3. **Time series analysis?** Read `quickstart.md` then `time-series.md` 4. **Checking model assumptions?** Read `diagnostics.md` 5. **Coming from R?** Read `quickstart.md` (formula API mirrors R syntax)
What kind of regression?
├─ Linear (continuous outcome)
│ ├─ Basic OLS → ./references/linear-models.md
│ ├─ Weighted least squares → ./references/linear-models.md
│ │ (⚠ WLS ≠ survey-weighted regression — for complex surveys, use `svy` skill)
│ ├─ Correlated errors (GLS) → ./references/linear-models.md
│ ├─ Robust to outliers (M-estimator) → ./references/linear-models.md
│ └─ Quantile regression → ./references/linear-models.md
├─ Binary outcome (0/1)
│ ├─ Logit → ./references/glm-discrete.md
│ └─ Probit → ./references/glm-discrete.md
├─ Count outcome (0, 1, 2, ...)
│ ├─ Poisson → ./references/glm-discrete.md
│ ├─ Negative binomial → ./references/glm-discrete.md
│ └─ Zero-inflated → ./references/glm-discrete.md
├─ Multinomial (3+ categories)
│ └─ Multinomial logit → ./references/glm-discrete.md
├─ GLM (custom family/link)
│ └─ GLM framework → ./references/glm-discrete.md
└─ Need fixed effects?
└─ Use pyfixest instead (faster FE absorption)What time series task? ├─ Forecast a single series │ ├─ ARIMA / SARIMAX → ./references/time-series.md │ └─ Exponential smoothing → ./references/time-series.md ├─ Multiple interrelated series │ └─ VAR / VECM → ./references/time-series.md ├─ Test for stationarity │ ├─ ADF test → ./references/time-series.md │ └─ KPSS test → ./references/time-series.md ├─ Examine autocorrelation │ └─ ACF / PACF → ./references/time-series.md └─ Structural
📌 文档结构(2026-07-22 起): 本文件是中文默认入口 —— banner + badges + 信任面 + 9 阶段流水线速览 + 76 行合集总表。 每个合集的完整描述、按用途分组、精确数字、验证方法在 docs/CONTENT_ZH.md(扩展正文,总表行内的 → 直接跳转到对应锚点)。 English version: README-en.md · 中文扩展正文:docs/CONTENT_ZH.md · README-zh-CN.md 已弃用(重定向占位) 🌐 语言: English |
Classical end-to-end empirical analysis workflow in the traditional Python econometric stack — pandas + numpy + scipy + statsmodels + linearmodels + pyfixest +…
Use when the user asks to run a full empirical / causal analysis in Python — by default in the style of an applied economics paper (AER / QJE / JPE / ReStud /…
Classical end-to-end empirical analysis workflow in the traditional Python econometric stack — pandas + numpy + scipy + statsmodels + linearmodels + pyfixest +…
Classical end-to-end empirical analysis workflow in the traditional Stata ecosystem — native Stata + reghdfe + ivreg2 + csdid + did_imputation +…
Classical end-to-end empirical analysis workflow in the modern tidyverse + econometrics R ecosystem — dplyr + tidyr + haven + fixest + sandwich + lmtest +…
Systematic writing framework for philosophy and interdisciplinary academic papers from optimized outline to submission-ready manuscript. Use when users want…