statsmodels
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.
Statsmodels fits regression models with detailed statistical inference, diagnostics, and publication-ready tables for econometrics and time series analysis.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-28
Statsmodels fits regression models with detailed statistical inference, diagnostics, and publication-ready tables for econometrics and time series analysis. 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.
Use it when
- Statsmodels includes ARIMA and SARIMAX classes for time series modeling and forecasting.
- Statsmodels provides rigorous diagnostic tools to test statistical assumptions: residual plots, normality tests, heteroskedasticity tests.
Verify before relying
Read SKILL.md below before installing (9 files). Open directory: indexed for reading, not audited.
Install
K-Dense-AI/scientific-agent-skills/statsmodels · repository language: Python
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
What is statsmodels OLS regression and how do I use it?
Statsmodels is Python's statistical modeling library that provides OLS (ordinary least squares) regression for fitting linear models with full statistical inference. Use statsmodels when you need detailed coefficient estimates, standard errors, confidence intervals, and hypothesis tests—not just predictions. The library outputs publication-quality tables showing t-statistics, p-values, and model fit diagnostics automatically.
How do I fit an ARIMA time series model with statsmodels?
Statsmodels includes ARIMA and SARIMAX classes for time series modeling and forecasting. You specify (p,d,q) orders for ARIMA or add seasonal components for SARIMAX. The library handles differencing, lag selection, and produces forecasts with confidence intervals. It also provides residual diagnostics to validate that your model captures temporal structure properly.
How can I check model assumptions with statsmodels?
Statsmodels provides rigorous diagnostic tools to test statistical assumptions: residual plots, normality tests, heteroskedasticity tests, autocorrelation tests (Durbin-Watson, Ljung-Box), and influence diagnostics. After fitting any model, access these diagnostics through the results object to verify linearity, constant variance, independence, and normality before trusting your inference.
Does statsmodels support generalized linear models and count data?
Yes. Statsmodels' GLM class fits generalized linear models including logistic regression, Poisson regression for count data, negative binomial regression, and more. You specify the family (Binomial, Poisson, NegativeBinomial) and link function. Each model produces full inference: coefficients, standard errors, confidence intervals, and hypothesis tests for publication.
Can statsmodels handle mixed effects and clustered data?
Statsmodels supports mixed effects models through its MixedLM class for random intercepts and slopes. For clustered standard errors without random effects, use robust covariance estimators with clustering options in OLS and GLM. This accounts for within-group correlation and produces valid inference when observations are not independent.
What makes statsmodels different from scikit-learn for regression?
Statsmodels prioritizes statistical inference and diagnostics over prediction accuracy. It provides p-values, confidence intervals, hypothesis tests, and detailed model diagnostics—essential for research and causal analysis. Scikit-learn focuses on predictive performance. Choose statsmodels when coefficients and their uncertainty are your goal; choose scikit-learn for pure prediction tasks.
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.
Current Compatibility
Examples target statsmodels 0.14.6, released Dec 5, 2025. For reproducible environments, pin the primary
(truncated - see the full file via the links below)
File tree — 9 files
skills/statsmodels/SKILL.md
skills/statsmodels/references/discrete_choice.md
skills/statsmodels/references/glm.md
skills/statsmodels/references/linear_models.md
skills/statsmodels/references/model_selection.md
skills/statsmodels/references/modeling_capabilities.md
skills/statsmodels/references/quick_start_guide.md
skills/statsmodels/references/stats_diagnostics.md
skills/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 regression models with detailed statistical inference and diagnostics”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
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.
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.
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.
Quant-statistics provides time-series testing and volatility modeling tools for quantitative investing. It covers stationarity detection via ADF tests, cointegration analysis for pair trading, GARCH volatility forecasting, and regression diagnostics including heteroskedasticity and autocorrelation checks.
Conduct rigorous statistical tests—t-tests, ANOVA, chi-square, correlation, regression, and Bayesian methods—with systematic assumption verification and effect size reporting. The skill walks you through test selection, data inspection, assumption diagnostics, and APA-style write-ups so your analysis withstands peer review.
More skills statsmodels-stats (MIT)