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.
npx skills add K-Dense-AI/scientific-agent-skills --skill statsmodels -a claude-codeWhat 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 + x2and 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-code2Manually: put the files in place
~/.claude/skills/statsmodels/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/statsmodels/
1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill statsmodels -a codex2Manually: put the files in place
.agents/skills/statsmodels/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill statsmodels -a cursor2Manually: put the files in place
.cursor/skills/statsmodels/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install K-Dense-AI/scientific-agent-skills statsmodels2Manually: put the files in place
.github/skills/statsmodels/SKILL.md1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill statsmodels -a gemini-cli2Platform CLI
gemini skills install https://github.com/K-Dense-AI/scientific-agent-skills --path skills/statsmodelsManually: put the files in place
.devin/skills/statsmodels/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill statsmodels -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.