statsmodels
Statistical computations and models for Python
Decision gist · record as of 2026-08-14
Yes. statsmodels is a mature, actively maintained library with no known vulnerabilities, permissive licensing, and broad platform support. Install it if you need publication-quality statistical models, hypothesis tests, or time series analysis beyond what scipy or pandas provide. Medium install friction is typical for scientific Python packages and not a barrier.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires numpy and scipy; compilation may be needed if prebuilt wheels are unavailable for your platform.
- Medium install friction due to compiled dependencies (numpy, scipy).
- Active maintenance with recent release (252 days ago) and ongoing repository activity.
License · maintenance · safety
BSD License (permissive) — BSD License (permissive) permits commercial and private use with minimal restrictions; attribution required.
last release 2025-12-05 (252 days) · last repo commit 2026-08-13 · 11,574 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 45,723,143 downloads/mo, #617 on PyPI
Alternatives
Verify before relying
pip install statsmodels
import statsmodels.api as sm
model = sm.OLS(y, X).fit()
print(model.summary())- Whether all listed models (e.g., VARMA, Dynamic Factor, Markov switching) are equally production-ready or some remain experimental.
- Performance characteristics and scalability limits for large datasets or high-dimensional problems.
- Comparison of statsmodels' time series capabilities against scikit-learn or specialized packages.
What it is and what it does
statsmodels is a comprehensive statistical modeling library for Python that extends scipy with a wide range of estimation and inference tools. It covers linear and generalized linear models, time series analysis (ARIMA, VAR, state-space), discrete choice models (logit, probit, count regression), survival analysis, multivariate methods, and nonparametric statistics, along with diagnostic tests and graphics. The package is organized around model classes that follow a consistent API: fit data to a model, inspect results via a summary object, and extract predictions or diagnostics.
The library depends on numpy, scipy, pandas, and patsy for formula support. It targets researchers, data scientists, and analysts who need publication-ready statistical output and model diagnostics. Many models include hypothesis tests, confidence intervals, and goodness-of-fit measures built in. The sandbox folder contains experimental code not yet considered production-ready, and some advanced features (GMM, panel data) remain under development.
Use it for
- Fit ordinary least squares, quantile, or robust regression models with automatic diagnostic tests and summary tables.
- Build and forecast ARIMA, VARMA, or state-space time series models with seasonal components.
- Estimate logit, probit, or count regression models for discrete outcomes with marginal effects.
- Perform survival analysis using Cox proportional hazards or Kaplan-Meier estimators.
- Conduct hypothesis tests (unit root, cointegration, normality) and specification diagnostics on model residuals.
- Impute missing data using MICE or regression-based methods before analysis.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
statsmodels is a mature, actively maintained library with no known vulnerabilities, permissive licensing, and broad platform support. Install it if you need publication-quality statistical models, hypothesis tests, or time series analysis beyond what scipy or pandas provide. Medium install friction is typical for scientific Python packages and not a barrier.
Install
statsmodels on PyPI
Before you install
Medium install friction due to compiled dependencies (numpy, scipy). Active maintenance with recent release (252 days ago) and ongoing repository activity. Supports Python 3.9–3.13 with prebuilt wheels across major platforms.
Requires numpy and scipy; compilation may be needed if prebuilt wheels are unavailable for your platform.
License in practice
BSD License (permissive) permits commercial and private use with minimal restrictions; attribution required.
Quickstart
pip install statsmodels
import statsmodels.api as sm
model = sm.OLS(y, X).fit()
print(model.summary())
Verify before relying
- Whether all listed models (e.g., VARMA, Dynamic Factor, Markov switching) are equally production-ready or some remain experimental.
- Performance characteristics and scalability limits for large datasets or high-dimensional problems.
- Comparison of statsmodels' time series capabilities against scikit-learn or specialized packages.
Package facts
| License | BSD License permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 5 packagesnumpyscipypandaspatsypackaging |
| Maintenance | Actively maintained 252 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 45,723,143 / month, #617 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: End Users/DesktopIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: CythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Office/Business :: FinancialTopic :: Scientific/Engineering |
Evidence: statsmodels-0.14.6-cp310-cp310-macosx_10_9_x86_64.whl; statsmodels-0.14.6-cp310-cp310-macosx_11_0_arm64.whl; statsmodels-0.14.6-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; statsmodels-0.14.6-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; statsmodels-0.14.6-cp310-cp310-musllinux_1_2_x86_64.whl; statsmodels-0.14.6-cp310-cp310-win_amd64.whl; statsmodels-0.14.6-cp311-cp311-macosx_10_9_x86_64.whl; statsmodels-0.14.6-cp311-cp311-macosx_11_0_arm64.whl; statsmodels-0.14.6-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; statsmodels-0.14.6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; statsmodels-0.14.6-cp311-cp311-musllinux_1_2_x86_64.whl; statsmodels-0.14.6-cp311-cp311-win_amd64.whl; statsmodels-0.14.6-cp312-cp312-macosx_10_13_x86_64.whl; statsmodels-0.14.6-cp312-cp312-macosx_11_0_arm64.whl; statsmodels-0.14.6-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; statsmodels-0.14.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; statsmodels-0.14.6-cp312-cp312-musllinux_1_2_x86_64.whl; statsmodels-0.14.6-cp312-cp312-win_amd64.whl; statsmodels-0.14.6-cp313-cp313-macosx_10_13_x86_64.whl; statsmodels-0.14.6-cp313-cp313-macosx_11_0_arm64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “survival analysis cox models”
- statsmodelsstatsmodels provides statistical models, inference methods, and…
- lifelineslifelines implements survival analysis methods—Kaplan-Meier,…
- scikit-survivalscikit-survival provides survival analysis models that handle…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also linearmodels · spglm · pmdarima · reliability · runstats · lifelines · glum · gmr · scikit-posthocs · copulas