Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

statsmodels

Skill by statsmodels

Guides practical statistical modeling with statsmodels, covering model choice, formulas, fitting, diagnostics, inference, and prediction. Aimed at analysts who fit and interpret statsmodels models.

  • Score 91
  • 12k stars
  • BSD-3-Clause
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install statsmodels

Built from the published package, never by AI.

git clone --depth 1 https://github.com/statsmodels/statsmodels /tmp/statsmodels && mkdir -p ~/.claude/skills && cp -r /tmp/statsmodels/.agents/skills/statsmodels ~/.claude/skills/statsmodels

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install statsmodels in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The statsmodels skill gives an AI assistant a workflow for practical statistical modeling with the statsmodels library. It starts from the data and the question, covering the outcome's type, whether observations are independent or clustered or time ordered, whether the goal is inference, testing or prediction, and which rows are eligible. It then routes common situations to model families such as OLS, Logit, Poisson, MNLogit, OrderedModel, ConditionalLogit, MixedLM, GEE and statsmodels.tsa models.

The skill also covers formula and array specifications, intercept rules for model-specific cases, explicit missing-data handling, diagnostics, robust covariance, and prediction with predict or get_prediction. It points to reference files for a quick start, model selection, and diagnostics and inference. It is aimed at analysts and developers who fit and interpret statsmodels models.

Written from the project's SKILL.md and checked against it.

What it can do

  • Model family routingMatches response types such as binary, count, nominal or ordered categorical to suitable statsmodels models.
  • Model specificationExplains formula and array design matrices and when an intercept belongs in the model.
  • Intercept rulesFlags model-specific constant rules for OrderedModel and ConditionalLogit.
  • Missing data handlingAdvises inspecting missingness and choosing explicit handling before fitting and comparing models.
  • Fitting and result checksGuides checking convergence and parameterization before interpreting params, standard errors and p-values.
  • DiagnosticsCovers residual structure, influential observations, heteroskedasticity, autocorrelation and collinearity checks.
  • InferenceCovers covariance choices, confidence intervals and tests, and their interpretation limits.
  • PredictionUses predict or get_prediction on fitted results, with notes on prediction versus parameter intervals.
  • Model comparisonAdvises comparing models only when they are fit to the same observations.

Try asking

  • Pick a statsmodels model for my binary outcome with clustered rows
  • Fit an OLS model with a formula and check its residual diagnostics
  • Explain the intercept rules for OrderedModel in statsmodels

Good to know

  • Robust covariance does not repair a misspecified mean, link, likelihood or dependence structure.
  • A model that converges can still be inappropriate for the data or question.
  • Version-specific options should be checked against the current statsmodels docstring or source.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/statsmodels/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md6 KB
  • references/diagnostics_and_inference.md8 KB
  • references/model_selection_and_formula.md6 KB
  • references/quick_start.md4 KB

Alternatives to statsmodels

All alternatives →
kaggle-cliKaggle
94

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.

AAA Skill 7.7k
bigquery-bigframesgoogle
94

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.

AAA Skill 25k
data-loadingmicrosoft
94

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.

AAA Skill 18k
data-manager-api-setupgoogle
94

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.

AAA Skill 25k
managed-airflow-dag-authoringgoogle
94

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.

AAA Skill 25k
data-feedsdavila7
94

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.

AAA Skill 34k

Compare with kaggle-cli, bigquery-bigframes or data-loading

statsmodels: common questions

What models does the statsmodels skill help choose?

It routes continuous, binary, count, nominal, ordered categorical, grouped, repeated and time-ordered outcomes to starting models such as OLS, Logit, Poisson, MNLogit, OrderedModel, MixedLM, GEE and statsmodels.tsa.

Does the skill cover intercepts in statsmodels models?

Yes. It explains that formula APIs normally include an intercept, array constructors need an explicit constant, and OrderedModel and ConditionalLogit reject a constant in their designs.

How does it handle missing data?

The source says to inspect missingness before fitting, choose explicit handling such as missing="drop" or missing="raise" where supported, and avoid comparing models fit to different rows.

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 BSD-3-Clause licence. The service it connects to may have its own pricing.

Is statsmodels safe to use?

It scores 91 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.

statsmodels Install

Add to stack

Loading.