# Statsmodels

> Statsmodels

- Skill: `yuukias/statsmodels` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add yuukias/statsmodels`
- Raw SKILL.md: https://api.skillmd.com/api/skills/yuukias/statsmodels/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: YuukiAS (https://skillmd.com/u/yuukias)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/yuukias/statsmodels

---

# Statsmodels

## Workflow

1. Confirm outcome type, design matrix, grouping/time structure, missingness, and inferential target.
2. Select model family: OLS/WLS/GLS, GLM, discrete model, mixed model, survival/time series, or robust alternative.
3. Build formulas carefully. Encode categorical variables, interactions, offsets, exposure, and transformations explicitly.
4. Fit the model and inspect diagnostics before interpreting coefficients.
5. Use robust covariance, clustered standard errors, or model alternatives when assumptions are violated.
6. Report coefficients with scale, reference levels, confidence intervals, p-values where appropriate, and diagnostics.

## References

- Read `references/statsmodels-workflow.md` for model-selection and diagnostic checklists.
- Read `references/legacy-full-skill.md` for older code examples and extended API notes.

## Validation

- Formula terms and reference categories are explicit.
- Residual, influence, or convergence diagnostics are addressed.
- Interpretation uses the correct link/scale for the fitted model.

