statsmodels

Fit regression and time series models with statsmodels APIs and diagnostics.

783|65|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/LeonChaoX/qinyan-academic-skills --skill statsmodels-leonchaox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: statsmodels
Source: https://github.com/LeonChaoX/qinyan-academic-skills/tree/main/skills/11-%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90%E4%B8%8E%E7%BB%9F%E8%AE%A1%E5%BB%BA%E6%A8%A1/statsmodels
Command: npx skills add https://github.com/LeonChaoX/qinyan-academic-skills --skill statsmodels-leonchaox

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you perform rigorous statistical modeling and econometric analyses in Python, including estimation, inference, diagnostics, and publication-ready results, so you can trust your conclusions instead of relying on ad-hoc methods.

Core Features & Use Cases

  • Regression modeling & inference: Fit OLS/WLS/GLS-style linear models with coefficient tables, p-values, confidence intervals, and prediction intervals.
  • Generalized and discrete outcomes: Model binary, count, and positive continuous outcomes using GLM, Logit/Probit, Poisson/Negative Binomial, and related families.
  • Time series & forecasting: Build AR/ARIMA/SARIMAX workflows, perform stationarity checks, run residual diagnostics, and produce forecasts with uncertainty.
  • Diagnostics & robust validation: Test assumptions (heteroskedasticity, autocorrelation, normality), check influence/outliers, and compare competing models using AIC/BIC and likelihood-ratio tests.

Use it when you need end-to-end statistical analysis for research papers, theses, and grant proposals—especially when you must justify model choice and report defensible results.

Quick Start

Apply the statsmodels skill to fit an OLS regression with robust standard errors, run residual diagnostics (e.g., heteroskedasticity/autocorrelation checks), and return the coefficient table plus APA-ready interpretation for your outcome and predictors.

Frequently Asked Questions about statsmodels

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run an OLS regression with robust standard errors in Python?

To run OLS regression with robust standard errors, fit a linear model using the statsmodels API and specify a robust covariance type to generate coefficient tables, p-values, and confidence intervals for defensible inference. The Skill structures these outputs for publication-ready reporting.

Can I perform time series forecasting and stationarity checks with statsmodels?

Yes, you can build ARIMA and SARIMAX workflows for time series forecasting with statsmodels. The Skill performs stationarity checks, runs residual diagnostics, and produces forecasts complete with prediction intervals to quantify uncertainty.

What is the best way to test regression assumptions like heteroskedasticity and autocorrelation?

The best way to test regression assumptions is to run residual and influence diagnostics via statsmodels after fitting your model. This Skill checks for heteroskedasticity, autocorrelation, and normality, and compares competing models using AIC, BIC, and likelihood-ratio tests.

Does this approach support modeling binary and count outcomes for econometrics research?

Yes, this approach supports modeling binary and count outcomes for econometrics using GLM, Logit, Probit, and Poisson families. The Skill estimates parameters and produces inference with diagnostics for research-grade results suitable for theses and grant proposals.

How do I compare competing statistical models using AIC and BIC?

To compare competing statistical models using AIC and BIC, fit multiple models like OLS or GLM with statsmodels and evaluate their information criteria. The Skill supports model comparison via AIC, BIC, and likelihood-ratio tests to help justify your final model choice.