https://github.com/statsmodels/statsmodels
Statsmodels: statistical modeling and econometrics in Python
https://github.com/statsmodels/statsmodels
count-model data-analysis data-science econometrics forecasting generalized-linear-models hypothesis-testing prediction python regression-models robust-estimation statistics timeseries-analysis
Last synced: about 1 month ago
JSON representation
Statsmodels: statistical modeling and econometrics in Python
- Host: GitHub
- URL: https://github.com/statsmodels/statsmodels
- Owner: statsmodels
- License: bsd-3-clause
- Created: 2011-06-12T17:04:50.000Z (over 15 years ago)
- Default Branch: main
- Last Pushed: 2026-10-15T09:22:43.000Z (about 1 month ago)
- Last Synced: 2026-10-17T23:17:03.722Z (about 1 month ago)
- Topics: count-model, data-analysis, data-science, econometrics, forecasting, generalized-linear-models, hypothesis-testing, prediction, python, regression-models, robust-estimation, statistics, timeseries-analysis
- Language: Python
- Homepage: http://www.statsmodels.org/devel/
- Size: 63.8 MB
- Stars: 11,689
- Watchers: 284
- Forks: 3,629
- Open Issues: 2,820
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Citation: CITATION.cff
- Agents: AGENTS.md
Awesome Lists containing this project
- awesome-python - statsmodels - Statistical modeling and econometrics in Python. (Science)
- awesome-advanced-metering-infrastructure - statsmodels - Statistical modeling and econometrics in Python. (Python)
- awesome-python - statsmodels/statsmodels - Statsmodels: statistical modeling and econometrics in Python (Science and Math / Mathematics)
- awesome-python-data-science - statsmodels - Statistical modeling and econometrics. (Machine Learning Frameworks)
- awesome-python - statsmodels - Statistical modeling and econometrics in Python. (Science)
- awesome-python-machine-learning-resources - GitHub - (👨💻 380 · 🔀 2.4K · 📥 26 · 📦 68K · 📋 4.8K - 46% open · ⏱️ 23.08.2022): (机器学习框架)
- awesome-data-science-development - statsmodel _Statistical modeling and econometrics in Python_
- fucking-awesome-python-cn - statsmodels - :统计建模和计量经济学。 (资源列表 / 科学计算和数据分析)
- git-github.com-vinta-awesome-python - statsmodels - Statistical modeling and econometrics in Python. (Science)
- awesome-python-data-science - statsmodels - Statistical modeling and econometrics in Python. (Statistics)
- awesome-marketing-machine-learning - statsmodels
- awesome-list - Statsmodels - Statistical modeling and econometrics in Python. (Linear Algebra / Statistics Toolkit / Statistical Toolkit)
- awesome-python-zh - statsmodels - \-Python中的统计建模和计量经济学。 (科学)
- fintech-awesome-libraries - statsmodels - Statistical modeling and econometrics in Python. (Statistics)
- awesome-python - statsmodels - Statistical modeling and econometrics in Python. (Science)
- fucking-awesome-machine-learning - statsmodels - Statistical modelling and econometrics in Python. (Python)
- awesome-python - statsmodels - Statistical modeling and econometrics in Python. (Science)
- fucking-awesome-python - :octocat: statsmodels - :star: 8679 :fork_and_knife: 2735 - Statistical modeling and econometrics in Python. (Science)
- awesome-machine-learning - statsmodels - Statistical modelling and econometrics in Python. (Python)
- awesome-machine-learning - statsmodels - Statistical modeling and econometrics in Python. (Python)
- awesome-python - statsmodels - Statistical modeling and econometrics in Python. (Science)
- awesome_time_series_in_python - statsmodels - Contains a submodule for classical time series models and hypothesis tests (Libraries)
- awesome-machine-master - statsmodels - Statistical modeling and econometrics in Python. (Python / General-Purpose Machine Learning)
- awesome-machine-learning - statsmodels - Statistical modelling and econometrics in Python. (Python / General-Purpose Machine Learning)
- awesome-machine-learning - statsmodels - Statistical modeling and econometrics in Python. (Python / General-Purpose Machine Learning)
- python-awesome - statsmodels - Statistical modeling and econometrics in Python. (Science)
- awesome-machine-learning - statsmodels - Statistical modelling and econometrics in Python. (Python / General-Purpose Machine Learning)
- awesome-python - statsmodels - Statistical modeling and econometrics in Python. (Science)
- awesome-python-resources - GitHub - (👨💻 380 · 🔀 2.4K · 📥 26 · 📦 68K · 📋 4.8K - 46% open · ⏱️ 23.08.2022): (科学计算和数据分析)
- awesome-ai-data-github-repos - Statsmodels: Statistical Modeling and Econometrics in Python
- jimsghstars - statsmodels/statsmodels - Statsmodels: statistical modeling and econometrics in Python (Python)
- awesome-python - statsmodels - Statistical modeling and econometrics in Python. (Science)
- awesome-python - statsmodels - Statsmodels: statistical modeling and econometrics in Python ` 📝 4 days ago ` (Science [🔝](#readme))
- fucking-awesome-python - statsmodels - Statistical modeling and econometrics in Python. (Projects / Science)
- awesome-python-fa - statsmodels - مدلسازی آماری، رگرسیون و آزمونهای آماری. (📚 فهرست / کتابخانه هاي تحليل داده)
- awesome-python-cn - statsmodels - :统计建模和计量经济学。 (资源列表 / 科学计算和数据分析)
- awesome-python - statsmodels - Statistical modeling and econometrics in Python. (Science)
- awesome-machine-learning - statsmodels - Statistical modelling and econometrics in Python. (Python / General-Purpose Machine Learning)
- awesome-quant - statsmodels/statsmodels - Statsmodels: statistical modeling and econometrics in Python `Python` · ⭐ 11,589 · forks 0 · updated 2026-08-24 · license BSD-3-Clause (Time Series Analysis & Econometrics)
- awesome-machine-learning-cn - 官网
- awesome-data-analysis - Statsmodels - Statistical modeling, testing, and data exploration. (🎲 Statistics & Probability / Tools)
- github-ultimate-repos - statsmodels/statsmodels - | ⭐ 11,714★ | 🍴 3,648 | 💻 `Python`🔗 <https://github.com/statsmodels/statsmodels>📝 Statsmodels: statistical modeling and econometrics in Python⚙️ `CPython C-API binding -> vectorized NumPy ndarray broadcasting -> SIMD/BLAS numerical linear algebra -> computational pipeline execution -> serialized analytical output.` (📜 Master Categorized Repository Directory (100% Clickable Links) / [55] PYTHON ECOSYSTEM, DATA SCIENCE, SCIENTIFIC COMPUTING & ANALYTICS)
- awesome-systematic-trading - statsmodels - Python module that allows users to explore data, estimate statistical models, and perform statistical tests. (TimeSeries Analysis)
- Python-Awesome - statsmodels - Statistical modeling and econometrics in Python. (Science)
- awesome-python-machine-learning - 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. (Uncategorized / Uncategorized)
- awesome-starred - statsmodels - Statsmodels: statistical modeling and econometrics in Python (Python)
- awesome-python-data-science - statsmodels - Statistical modeling and econometrics in Python. (Statistics)
- awesome-python - statsmodels - <img src="assets/star.png" width="16" /> 3674 - Statsmodels: statistical modeling and econometrics in Python (Awesome Python / Science)
- fucking_awesome_python - statsmodels - Statistical modeling and econometrics in Python. (Science and Data Analysis)
README

[](https://pypi.org/project/statsmodels/)
[](https://anaconda.org/conda-forge/statsmodels/)
[](https://github.com/statsmodels/statsmodels/blob/main/LICENSE.txt)
[](https://dev.azure.com/statsmodels/statsmodels-testing/_build/latest?definitionId=1&branchName=main)
[](https://codecov.io/gh/statsmodels/statsmodels)
[](https://pypi.org/project/statsmodels/)
[](https://anaconda.org/conda-forge/statsmodels/)
# 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
The documentation for the development version is at
Recent improvements are highlighted in the release notes
Backups of documentation are available at
and
.
# 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
Source download of release tags are available on GitHub
Binaries and source distributions are available from PyPi
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.
``` 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
# Contributing
Contributions in any form are welcome, including:
- Documentation improvements
- Additional tests
- New features to existing models
- New models
for instructions on installing statsmodels in *editable* mode.
# License
Modified BSD (3-clause)
# Discussion and Development
Discussions take place on the mailing list
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