Skip to main content
skill CX Codex

statsmodels · k-dense-ai — Claude Code skill: regressions and econometrics

This skill teaches the agent to fit and diagnose Python statistical models: OLS, GLM, discrete outcomes and time series. Useful when you need coefficients plus a check on model assumptions.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add K-Dense-AI/scientific-agent-skills --skill statsmodels -a claude-code
Open on GitHub

What statsmodels does

The skill covers statsmodels in Python: linear models (OLS, WLS, GLS, quantile regression), generalized linear models, discrete choice, count and ordinal outcomes, ARIMA, SARIMAX, VAR and forecasting. Diagnostics get their own treatment — heteroskedasticity, autocorrelation, residual normality, outliers and influential points, model comparison via AIC/BIC and likelihood ratio tests.

Inside are reference files: a quick start with small worked examples for OLS, logistic regression, ARIMA and GLM, an overview of modeling capabilities, model selection and the R-style formula API, plus per-topic files on linear models, GLM, discrete choice, time series and diagnostics. The agent gets Read, Write, Edit and Bash.

You need Python 3.10+ and statsmodels 0.15.0; the tested NumPy 2.5.3 and SciPy 1.18.1 stack calls for Python 3.12+. Plotting requires matplotlib, predictive metrics require scikit-learn. Network access matters only for installation or docs, and no credentials are involved. Install into a dedicated environment: uv pip install statsmodels==0.15.0 numpy==2.5.3 scipy==1.18.1 pandas==3.0.6 matplotlib==3.11.2 scikit-learn==1.9.1. Mismatched NumPy and SciPy versions are where things break — 0.15 moved several tests to result_object=True with named fields, and rng= replaces the older seed and random_state arguments.

What it helps with

  • fit an OLS model and test residuals for heteroskedasticity
  • estimate a logistic regression and compute marginal effects
  • handle overdispersion in count data by switching to negative binomial
  • build an ARIMA or SARIMAX forecast
  • compare nested models with AIC/BIC and a likelihood ratio test

Example prompts for the agent

  • Fit OLS with the formula y ~ x1 + x2 and show residual diagnostics
  • Check this Poisson model for overdispersion and move to negative binomial if it shows up
  • Run SARIMAX on this series and give me the forecast with confidence intervals

How to install statsmodels

1Skills CLI (Vercel)

npx skills add K-Dense-AI/scientific-agent-skills --skill statsmodels -a claude-code

2Manually: put the files in place

~/.claude/skills/statsmodels/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/statsmodels/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about statsmodels

How do I install the statsmodels skill in Claude Code?

Run npx skills add K-Dense-AI/scientific-agent-skills --skill statsmodels -a claude-code. The skill lands at ~/.claude/skills/statsmodels/SKILL.md.

What does the statsmodels skill do?

It lets the agent fit and diagnose Python statistical models: linear and generalized linear models, discrete choice, ARIMA and SARIMAX. That includes model comparison, marginal effects and forecasting.

What does the skill require?

Python 3.10+ and statsmodels 0.15.0. Plotting needs matplotlib and predictive metrics need scikit-learn; the tested NumPy 2.5.3 and SciPy 1.18.1 stack needs Python 3.12+.

Similar skills

All skills for Data and databases →

statsmodels by other authors comes first.

From the same set159

seaborn A skill that gets your coding agent building seaborn plots from pandas DataFrames: distributions, regressions, pairplots and heatmaps, written against the current API. CX Codex +1 2,100installs markdown-mermaid-writing Writes scientific Markdown docs and Mermaid structural diagrams: workflows, relationships, timelines, schemas. Handy when a report or README has to live in git as text. CX Codex +1 2,100installs hypothesis-generation Turns raw observations into testable hypotheses, rival explanations, and preregistration analysis plans without mistaking tentative claims for proven facts. CX Codex +1 2,100installs markitdown A Claude Code skill that runs Microsoft MarkItDown over PDFs, Office files, HTML and CSV so the text ends up as Markdown ready for search or RAG. CX Codex +1 2,100installs exploratory-data-analysis Runs bounded local exploratory analysis on scientific files like CSV, NumPy, and HDF5. It profiles datasets safely without network access or raw data leakage. CX Codex +1 2,100installs parallel-web Unified skill for web search, PDF extraction, deep research, and entity enrichment via parallel-cli. Ideal for technical research and scientific sources. CX Codex +1 2,000installs umap-learn This skill guides UMAP-based dimensionality reduction, 2D/3D embeddings, and clustering preparation. Use it when an agent needs supervised or semi-supervised UMAP workflows. CX Codex +1 2,000installs optimize-for-gpu Accelerates data-heavy Python workloads on NVIDIA GPUs and benchmarks the end-to-end speedup against the CPU baseline. CX Codex +1 2,000installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor