statsmodels
Statsmodels delivers rigorous statistical modeling for regression, generalized linear models, time series, and discrete outcomes. Access comprehensive diagnostics, robust standard errors, influence statistics, and publication-quality inference tables. Ideal for econometrics, causal estimation, and hypothesis testing.
Statsmodels fits regression models with comprehensive statistical inference, diagnostics, and publication-ready tables.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-27
Statsmodels fits regression models with comprehensive statistical inference, diagnostics, and publication-ready tables. Statsmodels delivers rigorous statistical modeling for regression, generalized linear models, time series, and discrete outcomes. Access comprehensive diagnostics, robust standard errors, influence statistics, and publication-quality inference tables. Ideal for econometrics, causal estimation, and hypothesis testing.
Use it when
- Statsmodels' ARIMA class enables time series forecasting with autoregressive, integrated, and moving average components.
- Statsmodels' Logit class handles binary outcomes with maximum likelihood estimation.
Verify before relying
Read SKILL.md below before installing (6 files). Open directory: indexed for reading, not audited.
Install
synthetic-sciences/openscience/statsmodels · repository language: TypeScript
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I fit an OLS regression model with statsmodels?
Statsmodels provides the OLS class for ordinary least squares regression with detailed statistical inference. Import `statsmodels.api`, prepare your data with an intercept column, instantiate `OLS(y, X)`, call `.fit()`, and access the results object for coefficients, standard errors, t-statistics, p-values, and confidence intervals via `.summary()`. The results include R-squared, F-statistics, and diagnostic information for publication-quality reporting.
What's the best way to fit ARIMA time series models?
Statsmodels' ARIMA class enables time series forecasting with autoregressive, integrated, and moving average components. Specify (p, d, q) parameters, fit the model with `.fit()`, and generate forecasts using `.get_forecast()` or `.fittedvalues`. Statsmodels handles differencing, lag selection diagnostics, and residual analysis to validate stationarity and model assumptions before deployment.
How can I perform logistic regression for binary outcomes?
Statsmodels' Logit class handles binary outcomes with maximum likelihood estimation. Build your model with `Logit(y, X)`, fit it, and extract marginal effects, odds ratios, and classification metrics from the results. The framework supports robust standard errors, clustering adjustments, and detailed coefficient tables suitable for econometric and epidemiological applications.
How do I test for heteroskedasticity and validate residual diagnostics?
Statsmodels offers comprehensive diagnostic tools including Breusch-Pagan and White tests for heteroskedasticity, Durbin-Watson for autocorrelation, and influence statistics (leverage, Cook's distance). Access these via the results object's `.get_robustcov_results()` for robust covariance, `.resid_pearson` for standardized residuals, and plotting functions for visual assumption validation.
Can statsmodels handle count data like Poisson and negative binomial?
Yes. Statsmodels' GLM framework supports Poisson regression for count outcomes and NegativeBinomial for overdispersed data. Zero-inflated variants (ZeroInflatedPoisson, ZeroInflatedNegativeBinomial) model excess zeros. Fit with `.fit()`, inspect dispersion parameters, and extract marginal effects to quantify covariate impact on expected counts.
How do I compare models and select the best fit using information criteria?
Statsmodels reports AIC and BIC in all results summaries for model comparison. Lower values indicate better fit; use these criteria alongside likelihood ratio tests to rank competing specifications. The framework supports nested and non-nested comparisons, enabling rigorous model selection for regression, GLM, and time series applications.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Statsmodels: Statistical Modeling and Econometrics
Overview
Statsmodels is Python's premier library for statistical modeling, providing tools for estimation, inference, and diagnostics across a wide range of statistical methods. Apply this skill for rigorous statistical analysis, from simple linear regression to complex time series models and econometric analyses.
When to Use This Skill
This skill should be used when: - Fitting regression models (OLS, WLS, GLS, quantile regression) - Performing generalized linear modeling (logistic, Poisson,
(truncated - see the full file via the links below)
File tree — 6 files
backend/cli/skills/coding/statsmodels/SKILL.md
backend/cli/skills/coding/statsmodels/references/discrete_choice.md
backend/cli/skills/coding/statsmodels/references/glm.md
backend/cli/skills/coding/statsmodels/references/linear_models.md
backend/cli/skills/coding/statsmodels/references/stats_diagnostics.md
backend/cli/skills/coding/statsmodels/references/time_series.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Fit and interpret regression models with detailed statistical inference”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Statsmodels is Python's statistical modeling library for fitting regression, generalized linear, time series, and discrete outcome models with full inference capabilities. It delivers detailed diagnostics, residuals analysis, hypothesis tests, and publication-ready output—ideal when coefficients and their uncertainty matter more than prediction alone.
Pywayne Statistics provides a unified library for statistical hypothesis testing across normality assessment, group comparisons, correlation analysis, time series validation, and regression diagnostics. Each test returns consistent result objects with p-values, confidence intervals, and effect sizes, making it straightforward to validate data assumptions and detect significant effects in A/B tests and observational studies.
Statsmodels provides classical statistical modeling with rigorous inference for Python, covering linear regression, generalized linear models, discrete choice analysis, and time series forecasting. It emphasizes coefficient interpretation, hypothesis testing, and model diagnostics rather than prediction optimization. Use this skill when you need detailed statistical inference, confidence intervals, and assumption validation.
Time Series Analysis breaks down temporal data into its component parts—trend, seasonality, and residuals—to uncover patterns and make predictions. Use it to forecast future values, detect cyclical behavior, and understand how variables change over time through techniques like ARIMA, exponential smoothing, and decomposition.
Statsmodels delivers rigorous statistical inference through comprehensive model estimation, diagnostic testing, and publication-ready summaries. It excels at linear and generalized linear regression, time series modeling, ANOVA, survival analysis, and causal inference—all with the p-values and confidence intervals essential for academic and scientific work.
statsmodels-stats provides regression modeling, hypothesis testing, and time series analysis for statistical workflows. Build OLS, logistic, and generalized linear models; run t-tests, ANOVA, and proportion tests; fit ARIMA and VAR models; and perform survival analysis with diagnostic plots and rigorous statistical reporting.
More skills scikit-learn (Apache-2.0) · quant-statistics (MIT) · datamodellm (MIT) · data-stats-analysis (MIT)