regression-modeler

Runs OLS and logistic regression on CSV or Excel data with coefficients, p-values, and VIF.

4.6k|462|Updated Jun 21, 2025
One-click install
npx skills add https://github.com/zebbern/claude-code-guide --skill regression-modeler
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: regression-modeler
Source: https://github.com/zebbern/claude-code-guide/tree/main/skills/regression-modeler
Command: npx skills add https://github.com/zebbern/claude-code-guide --skill regression-modeler

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, statsmodels, scipy, and includes scripts (resource) components.

What problem does it solve?

Running regression analysis normally requires writing statsmodels code, checking assumptions, and interpreting statistical output manually. This Skill automates the entire workflow: it loads tabular data, fits a linear or logistic regression model, and returns coefficients, R-squared, p-values, VIF scores, and plain-language interpretation in structured JSON.

Core Features & Use Cases

  • Linear and Logistic Regression: Performs OLS with R-squared, adjusted R-squared, F-test, AIC/BIC, and Durbin-Watson, or Logit with odds ratios, pseudo R-squared, and likelihood ratio tests.
  • Automatic Model Selection: Detects binary (0/1) target variables and automatically switches to logistic regression.
  • Multicollinearity Detection: Computes VIF for every predictor with warning levels for moderate and severe collinearity.
  • Use Case: Given a CSV of housing data, run the analyzer with price as the target to instantly get per-feature coefficients, significance levels, VIF warnings, and a readable explanation of which factors drive price.

Quick Start

Run the regression analyzer script on your CSV file with the target column specified, for example asking to fit a regression predicting price from the numeric columns in data.csv.

Frequently Asked Questions about regression-modeler

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a linear regression on a CSV file in Python?

Run the regression analyzer script with your CSV file and target column, for example: python3 scripts/regression_analyzer.py data.csv --target price. It fits an OLS model using statsmodels and outputs coefficients, R-squared, p-values, and VIF as JSON.

How to choose between linear and logistic regression for my data?

Use linear regression (OLS) for continuous target variables and logistic regression (Logit) for binary 0/1 outcomes. The script auto-detects the type by default, switching to logistic regression when the target column contains only two binary values.

What is VIF and how do I check multicollinearity in regression?

VIF (variance inflation factor) measures how much a predictor is correlated with other predictors. The script computes VIF for every feature, flagging values above 5 as moderate concern and above 10 as severe multicollinearity that may require removing or merging variables.

Does the regression analyzer support Excel files?

Yes, the script reads CSV, TSV, Excel (.xls/.xlsx), and JSON files through pandas. It automatically selects all numeric columns as predictors unless you specify features manually with the --features flag.

Why does my regression fail with not enough data rows?

The script requires at least two more rows than the number of predictors after dropping missing values. If your dataset has many NaN values or too few observations, either clean the data, reduce the feature count, or collect more samples.