SPB Git
6.0 KB · 50 lines json
1{2  "slug": "statsmodels",3  "name": "statsmodels",4  "aliases": [],5  "vendor": { "name": "statsmodels developers (NumFOCUS)", "slug": "statsmodels", "website": "https://www.statsmodels.org" },6  "homepage_url": "https://www.statsmodels.org/",7  "docs_url": "https://www.statsmodels.org/stable/index.html",8  "repo_url": "https://github.com/statsmodels/statsmodels",9  "license_url": "https://github.com/statsmodels/statsmodels/blob/main/LICENSE.txt",10  "product_type": "library",11  "product_status": "active",12  "summary": "Python library for estimating statistical and econometric models with R-style formulas, rich result summaries and tests: OLS, GLM, discrete choice, ARIMA, state space, VAR and more",13  "description": "statsmodels is the main Python library for classical statistical modelling and econometrics, released under the Modified BSD (3-clause) license and fiscally sponsored by NumFOCUS. It provides estimators with full inference output in the style of R or Stata: linear regression (OLS, WLS, GLS, quantile regression), generalized linear models, robust linear models, discrete-choice models (logit, probit, multinomial, count models), mixed-effects models, generalized estimating equations, survival analysis, nonparametric methods and a large statistics module with hypothesis tests, multiple-comparison corrections and diagnostics. Models can be specified with R-style formulas on pandas DataFrames or directly with arrays, and every estimator returns a results object with coefficients, standard errors (including heteroskedasticity- and cluster-robust options), tests and a text summary that is tested against reference implementations.\n\nTime-series support is extensive: ARIMA and SARIMAX, exponential smoothing, unobserved-components and custom state-space models with Kalman filtering, VAR/VECM, dynamic factor models, Markov switching, unit-root and cointegration tests, seasonal decomposition and forecasting utilities. Version 0.15.0 is current at the time of writing.\n\nstatsmodels is the natural choice when a Python workflow needs inference rather than prediction, which distinguishes it from scikit-learn. It complements rather than replaces specialized packages: linearmodels adds panel, IV and system estimators; arch adds volatility models and bootstrap methods. Limitations include slower development of high-dimensional fixed-effects tools compared with R's fixest, a less uniform API across older and newer modules, and single-machine, in-memory execution.",14  "capabilities": ["OLS, WLS, GLS and quantile regression with robust and clustered covariance", "Generalized linear and robust linear models", "Discrete choice and count models", "ARIMA/SARIMAX, exponential smoothing and state-space models", "VAR, VECM, dynamic factor and Markov-switching models", "Unit-root, cointegration and diagnostic tests", "R-style formula interface on pandas DataFrames", "Mixed-effects, GEE, survival and nonparametric methods"],15  "workflows": ["Regression tables for a working paper exported from summary objects", "Event-study or difference-in-differences with clustered standard errors", "ARIMA/state-space forecasting of macro series", "Pre-estimation diagnostics and hypothesis tests in a notebook"],16  "advantages": ["Inference-focused output comparable to R and Stata", "BSD-licensed and widely installed", "Deep time-series toolkit", "Results validated against reference packages"],17  "limitations": ["High-dimensional fixed effects slower than R's fixest", "API consistency varies across modules", "In-memory, single-node computation", "No built-in causal-ML estimators (see EconML, DoWhy)"],18  "prerequisites": ["Python with NumPy, SciPy and pandas"],19  "audiences": ["Econometricians and applied statisticians using Python", "Data scientists needing inference and diagnostics", "Students moving from Stata or R to Python"],20  "alternatives": ["linearmodels", "arch", "fixest", "scikit-learn", "stata", "r"],21  "comparison_notes": "scikit-learn optimizes for prediction and offers little inference; statsmodels is the inference counterpart. linearmodels and arch fill gaps (panel/IV/system models; GARCH and bootstraps) and share the same NumPy/pandas conventions. fixest in R and Stata's reghdfe remain faster for many-level fixed effects.",22  "categories": [{ "slug": "econometrics-causal-inference", "primary": true }, { "slug": "math-stats-tools" }, { "slug": "hf-finance-research" }],23  "tags": ["python", "econometrics", "time-series", "statistics", "open-source"],24  "use_cases": ["estimate-causal-effects", "analyze-intraday-data", "write-papers"],25  "operating_systems": ["macos", "linux", "windows"],26  "execution_modes": ["local"],27  "interfaces": ["library"],28  "deployment_models": ["embedded"],29  "integrations": ["pandas", "NumPy", "SciPy", "patsy/formulaic", "Matplotlib", "Jupyter", "linearmodels", "arch"],30  "data_formats": ["pandas DataFrame", "NumPy arrays", "Stata .dta (reader)"],31  "languages": ["Python", "Cython"],32  "source_model": "open-source",33  "license_spdx": "BSD-3-Clause",34  "pricing_model": ["free", "open-source"],35  "self_hostable": true,36  "sources": [37    { "url": "https://www.statsmodels.org/", "type": "official_site", "title": "statsmodels", "supports": ["name", "summary"], "checked_at": "2026-11-02" },38    { "url": "https://www.statsmodels.org/stable/index.html", "type": "official_docs", "title": "statsmodels documentation — statsmodels 0.15.0", "supports": ["capabilities", "description", "license_spdx"], "checked_at": "2026-11-02" },39    { "url": "https://github.com/statsmodels/statsmodels/blob/main/LICENSE.txt", "type": "license_page", "title": "statsmodels LICENSE.txt", "supports": ["license_spdx", "source_model"], "checked_at": "2026-11-02" },40    { "url": "https://github.com/statsmodels/statsmodels", "type": "repository", "title": "statsmodels/statsmodels", "supports": ["repo_url", "languages"], "checked_at": "2026-11-02" }41  ],42  "confidence": "high",43  "discovery_method": "editorial-research",44  "depth": "deep",45  "editorial_status": "reviewed",46  "visibility": "public",47  "featured": false,48  "author": "batch-E"49}50
Files · 19c0ff748ee94e0979c734f5fb3afeefc11ee9e1
Menu

Theme