
Statsmodels Statistical Modeling
Fit, test and diagnose regression, GLM, discrete, and time series models in Python with statsmodels
- Repository
- K-Dense-AI/scientific-agent-skills
- Stars
- 55,780
- Licence
- MIT
- Files
- 10 files
What it does
Once installed, the agent follows guidance for the Python statsmodels library, which fits classic statistical models such as linear regression, logistic and Poisson regression, mixed and discrete choice models, and ARIMA/SARIMAX time series forecasts. It also reports coefficients, confidence intervals, marginal effects and model comparisons, and checks assumptions like heteroskedasticity, autocorrelation and influential points. The skill stresses that a model fitting successfully does not prove causation or that the model is adequate, so the agent is expected to flag design and assumption problems.
Great for
- Analysts and econometrics students who want an agent to write and interpret statsmodels code
- Researchers running regression or time series analysis who want diagnostics and validation done systematically
- Developers building Python pipelines that need statistical model fitting with checks
Skip it if
- Choosing and reporting standard tests with APA formatting; the skill itself points to a separate statistical-analysis skill for that (wrong tool for the job)
- Causal claims from observational data without a sound study design; the skill warns that a fit alone does not establish causal identification
- Situations needing a verified result for high-stakes decisions without a human statistician reviewing the code and assumptions, since the agent may produce plausible but wrong specifications
Try asking
- “Fit a logistic regression on my customer churn CSV, check odds ratios and marginal effects, and validate on a holdout set”
- “Check whether my OLS residuals show heteroskedasticity or autocorrelation and refit with robust standard errors if needed”
- “Compare Poisson and negative binomial models for my count data and check for overdispersion and excess zeros”
- “Build a SARIMAX forecast for my monthly sales series with a chronological train/test split”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 10 original files, the MIT licence and an attribution note.
statsmodels.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip statsmodels.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip statsmodels.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Give the agent your data file, the outcome variable and the question you want answered, so it chooses the right model family rather than guessing
- Ask the agent to report diagnostics and assumption checks alongside coefficients, not just p-values
- Run the code in a dedicated virtual environment with the pinned versions, since the skill's allowed tools include Bash and it will execute Python scripts
What's inside
- references/discrete_choice.md
- references/glm.md
- references/linear_models.md
- references/model_selection.md
- references/modeling_capabilities.md
- references/quick_start_guide.md
- references/review.md
- references/stats_diagnostics.md
- references/time_series.md
- SKILL.md
Redistributed unmodified from K-Dense-AI/scientific-agent-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.