Tooluck logoTooluck
SKILL.md

statsmodels

Agent skill fromzLanqing/codex-claude-academic-skills

Statistical models library for Python. Use when you need specific model classes (OLS, GLM, mixed models, ARIMA) with detailed diagnostics, residuals, and inference. Best for econometrics, time series, rigorous inference with coefficient tables. For guided statistical test selection with APA reporting use statistical-analysis.

How to install statsmodels

install statsmodels
# install the codex-claude-academic-skills pack with the skills CLI
npx skills add zLanqing/codex-claude-academic-skills

# or add only this skill to Claude Code: copy the folder

scientific-toolkit-skill/references/scientific-skills/statsmodels/

# into

~/.claude/skills/statsmodels/ (all projects)

.claude/skills/statsmodels/ (one project)

scientific-toolkit-skill/references/scientific-skills/statsmodels/SKILL.md

MITFull file
1# Statsmodels: Statistical Modeling and Econometrics
2
3## Overview
4
5Statsmodels is Python's premier library for statistical modeling, providing tools for estimation, inference, and diagnostics across a wide range of statistical methods. Apply this skill for rigorous statistical analysis, from simple linear regression to complex time series models and econometric analyses.
6
7## When to Use This Skill
8
9This skill should be used when:
10- Fitting regression models (OLS, WLS, GLS, quantile regression)
11- Performing generalized linear modeling (logistic, Poisson, Gamma, etc.)
12- Analyzing discrete outcomes (binary, multinomial, count, ordinal)
13- Conducting time series analysis (ARIMA, SARIMAX, VAR, forecasting)
14- Running statistical tests and diagnostics
15- Testing model assumptions (heteroskedasticity, autocorrelation, normality)
16- Detecting outliers and influential observations
17- Comparing models (AIC/BIC, likelihood ratio tests)
18- Estimating causal effects
19- Producing publication-ready statistical tables and inference
20
21## Quick Start Guide
22
23### Linear Regression (OLS)
24
25```python
26import statsmodels.api as sm
27import numpy as np
28import pandas as pd
29
30# Prepare data - ALWAYS add constant for intercept
31X = sm.add_constant(X_data)
32
33# Fit OLS model
34model = sm.OLS(y, X)
35results = model.fit()
36
37# View comprehensive results
38print(results.summary())
39
40# Key results
41print(f"R-squared: {results.rsquared:.4f}")
42print(f"Coefficients:\\n{results.params}")
43print(f"P-values:\\n{results.pvalues}")
44…

Excerpt shown under the repository's MIT license.

More skills in codex-claude-academic-skills

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates