pipeline
Classical end-to-end empirical analysis workflow in the traditional Python econometric stack โ pandas + numpy + scipy +โฆ
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.
Claude Code
$ npx -y skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill statsmodels --agent claude-code
Codex
$ npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill statsmodels -a codex -y
Cursor
$ npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill statsmodels -a cursor -y
Gemini CLI
$ npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill statsmodels -a gemini-cli -y
GitHub Copilot
$ npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill statsmodels -a github-copilot -y
OpenCode
$ npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill statsmodels -a opencode -y
Windsurf
$ npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill statsmodels -a windsurf -y
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
## ๐ฅ ๅ่ ยท StatsPAI โ Stata ไธ R ็ Python ๅนณๆฟ๏ผไธบ AI Agent ่็ ๐ Stata / R ๅนณๆฟ๏ผreghdfeใcsdidใrdrobustใsynthใfixestใdid ็ญๅธธ็จๅฝไปคๅจ Python ไธญไธ็ซๅผๆฟไปฃ๏ผไธไธช import statspai as sp ๆๅฎ DID / RD / IV / SCM / DML / matching ๐ค ้ขๅ Agent ่ฎพ่ฎก๏ผ็ปๆๅ็ปๆๅฏน่ฑก + ๅ ็ฝฎ MCP Server๏ผClaude / Codex
Classical end-to-end empirical analysis workflow in the traditional Python econometric stack โ pandas + numpy + scipy +โฆ
Use when the user asks to run a full empirical / causal analysis in Python โ by default in the style of an applied economicsโฆ
Classical end-to-end empirical analysis workflow in the traditional Python econometric stack โ pandas + numpy + scipy +โฆ
Classical end-to-end empirical analysis workflow in the traditional Stata ecosystem โ native Stata + reghdfe + ivreg2 + csdid +โฆ
Classical end-to-end empirical analysis workflow in the modern tidyverse + econometrics R ecosystem โ dplyr + tidyr + haven +โฆ
Systematic writing framework for philosophy and interdisciplinary academic papers from optimized outline to submission-readyโฆ
Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also coversโฆ
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, fillingโฆ