statsmodels

Fit linear, generalized linear, and time-series models with statsmodels.

Updated Jan 22, 2026
One-click install
npx skills add https://github.com/tomlupo/ai-playground --skill statsmodels-tomlupo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: statsmodels
Source: https://github.com/tomlupo/ai-playground/tree/main/.claude/skills/statsmodels
Command: npx skills add https://github.com/tomlupo/ai-playground --skill statsmodels-tomlupo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, statsmodels, and includes references (resource) components.

What problem does it solve?

This Skill provides a unified workflow for statistical modeling and diagnostics using statsmodels, enabling rigorous analysis and reproducible inference.

Core Features & Use Cases

  • OLS/GLS/GLM support: Build linear and generalized linear models with robust diagnostics and summaries.
  • Time-series analytics: Fit ARIMA, SARIMAX, VAR, and related models with forecasting and diagnostic plots.
  • Model evaluation: Information criteria, likelihood ratio tests, and cross-validation-style checks to compare models and validate assumptions.
  • Reference-guided workflows: Leverage included reference documents (linear_models, time_series, GLM) to guide model selection and interpretation.

Quick Start

Run a quick example: load a sample dataset, fit an OLS model with statsmodels, and print the summary.

Frequently Asked Questions about statsmodels

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

FAQPage Schema
How do I perform linear regression and run diagnostics using statsmodels in Python?

To perform linear regression with statsmodels, load your data into a pandas DataFrame, fit an OLS model, and print the summary to view regression diagnostics. This provides rigorous statistical inference and model evaluation results.

Can I fit ARIMA and SARIMAX time-series models for forecasting in Python?

Yes, you can fit ARIMA, SARIMAX, and VAR time-series models using statsmodels. The workflow supports multivariate time-series forecasting and includes diagnostic plots to validate model assumptions and analyze econometric data.

What is the best way to compare statistical models and validate assumptions?

The best way to compare statistical models is using information criteria, likelihood ratio tests, and cross-validation-style checks. These model evaluation tools help validate assumptions and select the most appropriate GLM or regression model.

Does this approach support generalized linear models and discrete choice analysis?

Yes, this approach supports generalized linear models (GLM) and discrete choice analysis. It provides comprehensive reference materials to guide model selection and interpretation for econometrics, finance, and social science applications.

Do I need numpy and pandas installed to run statsmodels workflows?

Yes, you need numpy and pandas installed as dependencies to run statsmodels workflows. These libraries provide the foundational data structures and array processing required for statistical modeling and reproducible inference.