statsmodels
Skill by davila7
Statsmodels is a Python toolkit for statistical modeling and econometric analysis. It covers regression, GLMs, discrete choice, time series and hypothesis tests. It is aimed at analysts who need rigorous statistical inference.
Install statsmodels
Built from the published package, never by AI.
git clone --depth 1 https://github.com/davila7/claude-code-templates /tmp/claude-code-templates && mkdir -p ~/.claude/skills && cp -r /tmp/claude-code-templates/cli-tool/components/skills/scientific/statsmodels ~/.claude/skills/statsmodelsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/davila7/claude-code-templates /tmp/claude-code-templates && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/claude-code-templates/cli-tool/components/skills/scientific/statsmodels ~/.gemini/antigravity-cli/skills/statsmodelsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
Statsmodels is described in this skill as Python's premier library for statistical modeling. The skill guides an assistant through estimation, inference and diagnostics across regression, generalized linear models, discrete choice and time series. It covers OLS, WLS, GLS and quantile regression, logistic and Poisson models, ARIMA and SARIMAX, and tests for heteroskedasticity, autocorrelation and normality.
The skill also covers model comparison with AIC, BIC and likelihood ratio tests, influence measures, multiple comparison corrections and power analysis. R-style formulas are available through the formula API. It is aimed at analysts and researchers who need rigorous statistical inference and econometric analysis.
Written from the project's SKILL.md and checked against it.
What it can do
- Linear regressionFits OLS, WLS, GLS, GLSAR and quantile regression models with robust standard errors.
- Generalized linear modelsFits GLMs with binomial, Poisson, negative binomial, gamma and other families.
- Discrete choice modelsFits logit, probit, multinomial, ordered and zero-inflated count models.
- Time series analysisFits AR, ARIMA, SARIMAX, VAR and state space models and produces forecasts.
- Statistical tests and diagnosticsRuns autocorrelation, heteroskedasticity, normality and specification tests.
- Influence and outliersComputes leverage, Cook's distance, DFFITS, DFBETAs and studentized residuals.
- Hypothesis testingRuns t-tests, chi-square, non-parametric tests and ANOVA with multiple comparison corrections.
- Model comparisonCompares models with AIC, BIC and likelihood ratio tests for nested models.
- Formula APISpecifies models with R-style formulas such as smf.ols and smf.logit.
- Power and effect sizesCalculates effect sizes, power and sample sizes for common tests.
What you need
- Python
Try asking
- Fit an OLS regression of sales on price and ad spend and show the summary
- Run a Breusch-Pagan test on the residuals of my regression model
- Forecast the next 10 values of this time series with an ARIMA model
Good to know
- ARIMA is not available through the formula API and must use the regular API.
- The source includes only the main skill file in this excerpt; detailed guidance sits in referenced files.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: cli-tool/components/skills/scientific/statsmodels/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md19 KB -
references/discrete_choice.md17 KB -
references/glm.md16 KB -
references/linear_models.md13 KB -
references/stats_diagnostics.md20 KB
Show all 6 files
-
references/time_series.md18 KB
Alternatives to statsmodels
All alternatives →Guides an assistant through the Kaggle CLI, covering competitions, datasets, notebooks, models, benchmarks, authentication and quota. It is for people who use the kaggle command-line tool.
Generates Python code that uses BigQuery DataFrames (BigFrames) for data processing, analysis and machine learning on BigQuery. It is meant for Python data tasks, and the source says to use bigquery-basics for SQL-first workflows.
Discovers connected data sources and proposes loading options when a workspace lacks the data a question needs. Suited to users who want to connect database, warehouse or cloud sources from the chat.
Guides developers through enabling the Data Manager API, setting up Application Default Credentials, and installing its client libraries. Built for developers who are getting started with the API and need local environment and access setup.
Guides authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA), formerly Cloud Composer. Built for developers who create or extend Airflow DAGs in these environments.
Extracts structured JSON data from over 40 websites, including Amazon, LinkedIn, Instagram, TikTok, Facebook and YouTube. Built on Bright Data's Web Data APIs, it returns product details, profiles, reviews, posts and comments from a URL.
Compare with kaggle-cli, bigquery-bigframes or data-loading
statsmodels: common questions
What models does statsmodels support?
The skill covers OLS, WLS, GLS, quantile regression, GLMs, logistic and count models, and ARIMA, SARIMAX and VAR time series models.
Can statsmodels compare models?
Yes. The skill describes comparing models with AIC and BIC, and running likelihood ratio tests for nested models.
Does statsmodels support R-style formulas?
Yes, through statsmodels.formula.api, for example smf.ols and smf.logit. The source notes that ARIMA is not available via the formula API.
How do I install statsmodels?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is statsmodels free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is statsmodels safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to statsmodels?
Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.
