Python AGS Script HTML R Stata C Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
docs CLN/DOC: Add details on CLI test running Aug 17, 2018
examples fix and lint for E228 missing space around modulo operator Aug 15, 2018
statsmodels Merge pull request #4900 from jbrockmendel/gc11 Aug 20, 2018
tools Merge pull request #4895 from jbrockmendel/gc8 Aug 17, 2018
.bzrignore sandbox Mar 11, 2010
.coveragerc Recent versions of coverage require the show-missing config to be set… Feb 28, 2017
.gitattributes add gitattributes (numpy minus .nsi) Jun 12, 2011
.gitignore MAINT: gitignore univariate_diffuse pyx files. Jun 29, 2018
.mailmap MAINT: Update mailmap. Oct 15, 2014
.travis.yml TST: Xfail test on Python 3.7 Aug 20, 2018
.travis_coveragerc TST: Remove files from coverage Jul 30, 2017 DOC: Replace sourceforce with new site Jul 4, 2016
CONTRIBUTING.rst Replaced https by http in a statsmodels link. Feb 3, 2018
COPYRIGHTS.txt Docs: add license for qsturng-py and license notice for ordereddict Apr 8, 2012
INSTALL.txt BLD: Scale back minimum versions a bit. May 18, 2018
LICENSE.txt DOC: Update copyright dates Apr 1, 2012 PKG: Remove directory from manifest Feb 7, 2017
README.rst DOC: Reformat README May 2, 2018
README_l1.txt Updated examples Oct 6, 2012
appveyor.yml TST: Xfail test on Python 3.7 Aug 20, 2018 TST: Seperate out notebook testing Jul 30, 2017 Merge pull request #4891 from bashtage/fix-linting-move-coverage Aug 17, 2018
pyproject.toml BLD: Add pyproject Sep 30, 2017
setup.cfg Merge pull request #4900 from jbrockmendel/gc11 Aug 20, 2018 CLN: Remove nose and related references Aug 17, 2018


Travis Build Status Appveyor Build Status Coveralls Coverage

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.


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 modle, 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 developement 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 master 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

Installing from sources

See INSTALL.txt for requirements or see the documentation


Modified BSD (3-clause)

Discussion and Development

Discussions take place on our mailing list.

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

Bug Reports

Bug reports can be submitted to the issue tracker at