python_data_stack

Fit statistical models and run diagnostics with statsmodels for regression, time series, and econometric analysis.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/jvsandhu/agentic-skills --skill python-data-stack-jvsandhu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python_data_stack
Source: https://github.com/jvsandhu/agentic-skills/tree/main/skills/python_data_stack
Command: npx skills add https://github.com/jvsandhu/agentic-skills --skill python-data-stack-jvsandhu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires statsmodels, pandas, numpy, scipy, matplotlib, scikit-learn, and includes references (resource) components.

What problem does it solve? Performing rigorous statistical inference in Python requires choosing the right model for each outcome type, validating assumptions, and producing publication-ready results, which is error-prone without structured guidance. ## Core Features & Use Cases - Regression Modeling: Fit OLS, WLS, GLS, quantile, and mixed-effects linear models with robust standard errors and full diagnostic output. - Discrete & GLM Models: Run logistic, probit, multinomial, Poisson, Negative Binomial, and zero-inflated models with odds ratios and marginal effects. - Time Series Analysis: Build ARIMA, SARIMAX, VAR, and state space models with stationarity tests, ACF/PACF identification, and forecast intervals. - Use Case: An analyst fitting a logistic regression on customer churn data can use this skill to estimate odds ratios, check model fit, compute marginal effects, and validate predictions with AUC scoring. ## Quick Start Use the python_data_stack skill to fit an OLS regression on my dataset and show the full summary with residual diagnostics.

Frequently Asked Questions about python_data_stack

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

FAQPage Schema
How do I run a linear regression in Python with statsmodels?

Use sm.OLS with sm.add_constant() on your predictors, then call .fit() and .summary() for full inference output. The summary includes coefficients, p-values, R-squared, and diagnostic statistics.

How to fit an ARIMA time series model in Python?

Use statsmodels.tsa.arima.model.ARIMA with an order tuple like (1,1,1). First test stationarity with the ADF test, difference if needed, identify p and q from ACF/PACF plots, then call .fit() and .forecast().

statsmodels vs scikit-learn for regression, which should I use?

statsmodels is better for statistical inference since it provides p-values, confidence intervals, and diagnostic tests. scikit-learn focuses on prediction accuracy and pipelines without detailed inferential statistics.

When should I use Negative Binomial instead of Poisson regression?

Use Negative Binomial when count data shows overdispersion, meaning variance exceeds the mean. Check the Pearson chi-square divided by residual degrees of freedom; values above roughly 1.5 indicate overdispersion.

Why does my logistic regression fail to converge in statsmodels?

Non-convergence usually comes from perfect separation, collinear predictors, or unscaled features with extreme ranges. Check for separation by examining predicted probabilities near 0 or 1, and standardize continuous predictors.