Pythie
CategoriesTrending
An open index of Python tools.Pythie’s IndexLegal noticePrivacyData: PyPI (package metadata; download statistics under CC BY 4.0, via ClickHouse), deps.dev (CC BY 4.0), GitHub, OSV.

statsmodels

0.15.0ActivePythie’s Index: 69

Statistical computations and models for Python

Maintained. Last release 3 months ago, commits in 26 of the last 26 weeks. Weaker on release cadence and contributor spread.

Scientific ComputingData Analysis & DataFrames
$pip install statsmodels
statsmodels/statsmodelsHomepageDocsPyPI

Statsmodels logo

PyPI
Version Conda
Version License Azure CI Build
Status Codecov
Coverage PyPI - Downloads Conda
downloads

About statsmodels

statsmodels is a Python package that provides a complement to scipy for statistical computations including descriptive statistics and estimation and inference for statistical models.

Documentation

The documentation for the latest release is at

https://www.statsmodels.org/stable/

The documentation for the development version is at

https://www.statsmodels.org/dev/

Recent improvements are highlighted in the release notes

https://www.statsmodels.org/stable/release/

Backups of documentation are available at https://statsmodels.github.io/stable/ and https://statsmodels.github.io/dev/.

Main Features

  • Linear regression models:
    • Ordinary least squares
    • Generalized least squares
    • Weighted least squares
    • Least squares with autoregressive errors
    • Quantile regression
    • Recursive least squares
  • Mixed Linear Model with mixed effects and variance components
  • GLM: Generalized linear models with support for all of the one-parameter exponential family distributions
  • Bayesian Mixed GLM for Binomial and Poisson
  • GEE: Generalized Estimating Equations for one-way clustered or longitudinal data
  • Discrete models:
    • Logit and Probit
    • Multinomial logit (MNLogit)
    • Poisson and Generalized Poisson regression
    • Negative Binomial regression
    • Zero-Inflated Count models
  • RLM: Robust linear models with support for several M-estimators.
  • Time Series Analysis: models for time series analysis
    • Complete StateSpace modeling framework
      • Seasonal ARIMA and ARIMAX models
      • VARMA and VARMAX models
      • Dynamic Factor models
      • Unobserved Component models
    • Markov switching models (MSAR), also known as Hidden Markov Models (HMM)
    • Univariate time series analysis: AR, ARIMA
    • Vector autoregressive models, VAR and structural VAR
    • Vector error correction model, VECM
    • exponential smoothing, Holt-Winters
    • Hypothesis tests for time series: unit root, cointegration and others
    • Descriptive statistics and process models for time series analysis
  • Survival analysis:
    • Proportional hazards regression (Cox models)
    • Survivor function estimation (Kaplan-Meier)
    • Cumulative incidence function estimation
  • Multivariate:
    • Principal Component Analysis with missing data
    • Factor Analysis with rotation
    • MANOVA
    • Canonical Correlation
  • Nonparametric statistics: Univariate and multivariate kernel density estimators
  • Datasets: Datasets used for examples and in testing
  • Statistics: a wide range of statistical tests
    • diagnostics and specification tests
    • goodness-of-fit and normality tests
    • functions for multiple testing
    • various additional statistical tests
  • Imputation with MICE, regression on order statistic and Gaussian imputation
  • Mediation analysis
  • Graphics includes plot functions for visual analysis of data and model results
  • I/O
    • Tools for reading Stata .dta files, but pandas has a more recent version
    • Table output to ascii, latex, and html
  • Miscellaneous models
  • Sandbox: statsmodels contains a sandbox folder with code in various stages of development and testing which is not considered "production ready". This covers among others
    • Generalized method of moments (GMM) estimators
    • Kernel regression
    • Various extensions to scipy.stats.distributions
    • Panel data models
    • Information theoretic measures

How to get it

The main branch on GitHub is the most up to date code

https://www.github.com/statsmodels/statsmodels

Source download of release tags are available on GitHub

https://github.com/statsmodels/statsmodels/tags

Binaries and source distributions are available from PyPi

https://pypi.org/project/statsmodels/

Binaries can be installed in Anaconda

conda install statsmodels

Getting the latest code

Installing the most recent nightly wheel

The most recent nightly wheel can be installed using pip.

python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple statsmodels --upgrade --use-deprecated=legacy-resolver

Installing from sources

See INSTALL.txt for requirements or see the documentation

https://statsmodels.github.io/dev/install.html

Contributing

Contributions in any form are welcome, including:

  • Documentation improvements
  • Additional tests
  • New features to existing models
  • New models

https://www.statsmodels.org/stable/dev/test_notes

for instructions on installing statsmodels in editable mode.

License

Modified BSD (3-clause)

Discussion and Development

Discussions take place on the mailing list

https://groups.google.com/group/pystatsmodels

and in the issue tracker. We are very interested in feedback about usability and suggestions for improvements.

Bug Reports

Bug reports can be submitted to the issue tracker at

https://github.com/statsmodels/statsmodels/issues

Popularity

Downloads / month
43M
GitHub stars
11.8K
Downloads, last 7 days
9.8M-12%
Stars, last 7 days
–
Direct dependents
3.8K
All dependents
6.8K

Pythie’s Index

How it works
69

Fair

Maintenance, out of 100

  • Recent release

    last release 93 days ago

  • Commit activity

    26/26 weeks with commits

  • Release cadence

    2 releases in 12 months

  • Issues & PRs handled

    74% closed in the past year

  • Contributor spread

    3 authors in last 100 commits

  • OpenSSF Scorecard

    5.4/10

Commits, last 26 weeks4405

Releases

Latest
0.15.0
Released
Aug 27, 2026
Releases, 12 months
2
First release
Jun 19, 2012

Compatibility

Requires Python
>=3.10
Tested on
3.10 · 3.11 · 3.12 · 3.13 · 3.14
License
BSD-3-Clause (Permissive)

Keywords

statisticseconometricstime seriesregressionanovastatistical testslinear modelsgeneralized linear modelsdiscrete choice modelsrobust linear modelsmixed linear modelstime series analysisstate space modelsvector autoregressionvolatility modelingunit root testscointegration testsnonparametric methodsmultivariate statisticspython

Alternatives

Use instead of statsmodels: tools that do the same job, closest first.

Compare with glum →Compare with pyfixest →Compare with pingouin →Compare all 4 →

  • glum3.5.0ActivePythie’s Index: 94

    High performance Python GLMs with all the features!

    Scientific ComputingMachine Learning393439.1K/moReleased Nov 16, 2026
  • pyfixest0.70.0ActivePythie’s Index: 81

    Fast high dimensional fixed effect estimation following syntax of the fixest R package.

    Scientific ComputingUtilities & Language Tools370203.9K/moReleased Nov 8, 2026
  • pingouin0.7.0ActivePythie’s Index: 63

    Pingouin: statistical package for Python

    Scientific ComputingData Analysis & DataFrames1.9K494.3K/moReleased Sep 26, 2026

Works well with

Use together with statsmodels: extensions, drivers, servers and companion tools.

  • patsyPythie’s Index: 65A Python package for describing statistical models and for building design matrices.40.3M downloads/mo
  • sktimePythie’s Index: 89A unified framework for machine learning with time series674.3K downloads/mo
  • formulaicPythie’s Index: 38An implementation of Wilkinson formulas.17.1M downloads/mo
  • pmdarimaPythie’s Index: 26Python's forecast::auto.arima equivalent1.7M downloads/mo
  • linearmodelsPythie’s Index: 69Linear Panel, Instrumental Variable, Asset Pricing, and System Regression models for Python533.6K downloads/mo
  • pydeseq2Pythie’s Index: 69A python implementation of DESeq2.853.6K downloads/mo