
Research
Security News
The Landscape of Malicious Open Source Packages: 2025 Mid‑Year Threat Report
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
.. image:: docs/source/images/statsmodels-logo-v2-horizontal.svg :alt: Statsmodels logo
|PyPI Version| |Conda Version| |License| |Azure CI Build Status| |Codecov Coverage| |Coveralls Coverage| |PyPI downloads| |Conda downloads|
statsmodels is a Python package that provides a complement to scipy for statistical computations including descriptive statistics and estimation and inference for statistical models.
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/.
Linear regression models:
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:
RLM: Robust linear models with support for several M-estimators.
Time Series Analysis: models for time series analysis
Complete StateSpace modeling framework
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:
Multivariate:
Nonparametric statistics: Univariate and multivariate kernel density estimators
Datasets: Datasets used for examples and in testing
Statistics: a wide range of 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
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
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
Installing the most recent nightly wheel
The most recent nightly wheel can be installed using pip.
.. code:: bash
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
.. |Azure CI Build Status| image:: https://dev.azure.com/statsmodels/statsmodels-testing/_apis/build/status/statsmodels.statsmodels?branchName=main
:target: https://dev.azure.com/statsmodels/statsmodels-testing/_build/latest?definitionId=1&branchName=main
.. |Codecov Coverage| image:: https://codecov.io/gh/statsmodels/statsmodels/branch/main/graph/badge.svg
:target: https://codecov.io/gh/statsmodels/statsmodels
.. |Coveralls Coverage| image:: https://coveralls.io/repos/github/statsmodels/statsmodels/badge.svg?branch=main
:target: https://coveralls.io/github/statsmodels/statsmodels?branch=main
.. |PyPI downloads| image:: https://img.shields.io/pypi/dm/statsmodels?label=PyPI%20Downloads
:alt: PyPI - Downloads
:target: https://pypi.org/project/statsmodels/
.. |Conda downloads| image:: https://img.shields.io/conda/dn/conda-forge/statsmodels.svg?label=Conda%20downloads
:target: https://anaconda.org/conda-forge/statsmodels/
.. |PyPI Version| image:: https://img.shields.io/pypi/v/statsmodels.svg
:target: https://pypi.org/project/statsmodels/
.. |Conda Version| image:: https://anaconda.org/conda-forge/statsmodels/badges/version.svg
:target: https://anaconda.org/conda-forge/statsmodels/
.. |License| image:: https://img.shields.io/pypi/l/statsmodels.svg
:target: https://github.com/statsmodels/statsmodels/blob/main/LICENSE.txt
FAQs
Statistical computations and models for Python
We found that statsmodels demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.