statsmodels

Installation
SKILL.md

statsmodels Skill

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.

What is statsmodels?

statsmodels is the general-purpose statistical modeling library for Python:

  • Two APIs: Formula API (smf.ols("y ~ x1 + x2", data=df)) for R-style modeling, and array API (sm.OLS(y, X)) for programmatic control
  • Broad model coverage: OLS, WLS, GLS, GLM (all families), logit, probit, multinomial, count models, zero-inflated models, quantile regression, robust regression
  • Time series: ARIMA, SARIMAX, VAR, exponential smoothing, state space models, unit root tests
  • Diagnostics: Heteroskedasticity tests, normality tests, specification tests, VIF, influence measures, residual analysis
  • Hypothesis testing: t-tests, F-tests, Wald tests, likelihood ratio tests, multiple comparison corrections

How to Use This Skill

Reference File Structure

Installs
1
GitHub Stars
1.7K
First Seen
May 16, 2026
statsmodels — brycewang-stanford/awesome-agent-skills-for-empirical-research