Skip to main content
skill

statsmodels · davila7 — Claude Code skill: stats and econometrics

A skill for regressions, GLM, time series and hypothesis tests inside Claude. Useful when you need inference on coefficients, not just predictions.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --skill scientific/statsmodels
Open on GitHub

What statsmodels does

The skill covers statsmodels work: linear models (OLS, WLS, GLS, quantile regression), generalized linear models across distribution families, discrete choice models and time series such as ARIMA. It ships Python examples — adding a constant with sm.add_constant, reading results.summary(), pulling coefficients and p-values, building forecasts with confidence intervals.

Diagnostics get their own section. Breusch-Pagan for heteroskedasticity, the Dickey-Fuller test for stationarity, ACF and PACF plots to pick ARIMA orders, residual and influence statistics. Model comparison runs on AIC, BIC and likelihood ratio tests. Logistic regression comes with odds ratios and marginal effects via get_margeff.

The skill assumes Python and the statsmodels library, so a project without Python gets nothing from it. Several examples also pull in pandas, numpy, matplotlib and sklearn for metrics like AUC — worth checking your environment before asking the agent to fit a model.

What it helps with

  • fit an OLS regression and report coefficients with p-values
  • test residuals for heteroskedasticity and autocorrelation
  • compare candidate models by AIC and BIC
  • forecast a series with ARIMA and confidence intervals
  • compute odds ratios for a logistic regression

Example prompts for the agent

  • fit an OLS regression on this dataset and show me the summary with coefficients
  • check this time series for stationarity with the Dickey-Fuller test and pick ARIMA orders
  • compare these two models by AIC and BIC and explain the difference

How to install statsmodels

1claude-code-templates

npx claude-code-templates@latest --skill scientific/statsmodels

2Skills CLI (Vercel)

npx skills add davila7/claude-code-templates --skill statsmodels -a claude-code

3Manually: 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 statsmodels in Claude?

Use the templates command: npx claude-code-templates@latest --skill scientific/statsmodels. Or run npx skills add davila7/claude-code-templates --skill statsmodels -a claude-code. The skill file lands at ~/.claude/skills/statsmodels/SKILL.md.

What does the statsmodels skill do?

It gives the agent guidance on statistical modeling in Python: linear and generalized linear models, discrete choice, time series, plus tests and residual diagnostics.

What do I need for the statsmodels skill to work?

Python and the statsmodels library installed. The examples also use pandas, numpy, matplotlib and sklearn — for instance to score a logistic regression.

Similar skills

All skills for Data and databases →

statsmodels by other authors comes first.

From the same set205

The whole set →

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