Generated by GPT-5-mini| statsmodels | |
|---|---|
| Name | statsmodels |
| Developer | Python (programming language) community, Critical Path Project contributors |
| Released | 2010s |
| Programming language | Python (programming language), NumPy, SciPy |
| Operating system | Linux, Windows, macOS |
| Genre | Statistical software, Data analysis |
| License | BSD license |
statsmodels is an open-source Python library for statistical modeling and econometrics, providing classes and functions for estimation of many statistical models, conducting statistical tests, and exploring data through statistical graphics. It complements scientific computing projects such as NumPy, SciPy, and pandas (software), and is widely used in research at institutions such as Massachusetts Institute of Technology, Harvard University, Stanford University, University of California, Berkeley, and in industry at firms like Google, Facebook, Microsoft, Amazon (company). The project interfaces with visualization libraries such as matplotlib and seaborn and is commonly used alongside machine learning libraries like scikit-learn and TensorFlow.
statsmodels originated in the early 2010s as a community effort to provide a dedicated statistical modeling package for the Python (programming language) ecosystem, following needs identified by researchers at University of Oxford, University of Cambridge, and contributors from projects such as SciPy and NumPy. Influences and design ideas were drawn from legacy software including R (programming language), SAS, Stata, and SPSS, and from statistical texts by authors like Frank Harrell, Peter McCullagh, John Nelder, and David Cox. Early contributors included members of the Python Software Foundation community and academics associated with European University Institute and Princeton University. The project evolved through collaborative development on platforms such as GitHub and coordination in conferences like SciPy, PyData, and JupyterCon.
The library implements a broad range of statistical models: classical linear models inspired by work of Sir Ronald Fisher, generalized linear models based on theories by John Nelder and Roger Baker, time series models influenced by methods from Box–Jenkins and Herman Wold, panel data methods used in empirical economics at London School of Economics, and survival analysis routines applied in clinical research at Johns Hopkins University and Mayo Clinic. It provides hypothesis testing procedures linked to concepts popularized by Karl Pearson, William Sealy Gosset, and Jerzy Neyman, including t-tests, F-tests, likelihood ratio tests, and robust covariance estimation techniques associated with White (heteroskedasticity). The package includes tools for model selection, information criteria derived from Akaike, Hirotugu Akaike, Gideon Schwarz, Bayesian Information Criterion, and resampling methods related to Bradley Efron's bootstrap. For visualization and diagnostics, it interoperates with projects endorsed at The Python Conference and shown at PyCon tutorials.
Built on top of numerical libraries NumPy and SciPy, the codebase uses array operations and linear algebra engines like BLAS and LAPACK often provided by implementations such as OpenBLAS and Intel MKL. Data handling leverages designs from pandas (software) and interacts with data ingestion tools from Apache Arrow and HDF5. The model API design echoes ideas from statistical computing environments like R (programming language)'s formula interface and formal modeling frameworks discussed by Trevor Hastie and Robert Tibshirani. The project uses modern software engineering practices from GitHub, continuous integration patterns popularized by Travis CI and GitHub Actions, and packaging approaches advocated by Python Packaging Authority and PyPI (repository).
Typical workflows mirror examples shown in textbooks by Wes McKinney, Jake VanderPlas, and Joel Grus, combining data preparation with pandas (software) and modeling with statsmodels classes. Common tasks include estimating ordinary least squares regressions akin to empirical work at National Bureau of Economic Research, fitting autoregressive integrated moving average models used in forecasting at Federal Reserve Board research, and performing logistic regression analyses applied in studies at Centers for Disease Control and Prevention. Code examples are frequently demonstrated at workshops organized by The Alan Turing Institute, European Central Bank training, and university courses at Columbia University. Diagnostics and visualization steps are routinely paired with matplotlib and seaborn plotting routines shown in educational resources from O’Reilly Media and ACM tutorials.
Development is coordinated through contributor platforms used by projects like SciPy and NumPy, with governance practices influenced by Python Software Foundation norms and contributor agreements similar to those at Linux Foundation. The community includes researchers from Yale University, University of Chicago, Carnegie Mellon University, and corporate engineers from IBM, Intel, and NVIDIA. Discussions and support occur on forums patterned after Stack Overflow threads, mailing lists modeled after GNU Mailman lists, and chat channels like Matrix (protocol) or platforms used by PyData. The project has been showcased at conferences including SciPy, EuroPython, and International Conference on Machine Learning sessions, and contributors have published tutorials in venues such as Journal of Statistical Software and arXiv preprints.
statsmodels is often compared to domain-specific tools including R (programming language) packages like lm (R function), glm (R function), lme4, and forecast (R package), and commercial systems such as Stata, SAS, and SPSS. Unlike machine learning frameworks like scikit-learn and TensorFlow, it emphasizes statistical inference, hypothesis testing, and econometric diagnostics, paralleling methodologies from authors like Angrist and Pischke in applied econometrics. Integration patterns allow use with data platforms such as PostgreSQL, Apache Spark, and cloud services from Amazon Web Services, Google Cloud Platform, and Microsoft Azure, enabling deployment in academic labs at National Institutes of Health and analytics teams at Goldman Sachs.
Category:Free statistical software