statsmodels

Solid

Statistical modeling toolkit. OLS, GLM, logistic, ARIMA, time series, hypothesis tests, diagnostics, AIC/BIC, for rigorous statistical inference and econometric analysis.

AI & Automation 2,210 stars 164 forks Updated 1 weeks ago Apache-2.0

Install

View on GitHub

Quality Score: 91/100

Stars 20%
100
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Statsmodels: Statistical Modeling and Econometrics ## Overview Statsmodels 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. ## When to Use This Skill This skill should be used when: - Fitting regression models (OLS, WLS, GLS, quantile regression) - Performing generalized linear modeling (logistic, Poisson, Gamma, etc.) - Analyzing discrete outcomes (binary, multinomial, count, ordinal) - Conducting time series analysis (ARIMA, SARIMAX, VAR, forecasting) - Running statistical tests and diagnostics - Testing model assumptions (heteroskedasticity, autocorrelation, normality) - Detecting outliers and influential observations - Comparing models (AIC/BIC, likelihood ratio tests) - Estimating causal effects - Producing publication-ready statistical tables and inference ## Quick Start Guide ### Linear Regression (OLS) ```python import statsmodels.api as sm import numpy as np import pandas as pd # Prepare data - ALWAYS add constant for intercept X = sm.add_constant(X_data) # Fit OLS model model = sm.OLS(y, X) results = model.fit() # View comprehensive results print(results.summary()) # Key results print(f"R-squared: {results.rsquared:.4f}") print(f"Coefficients:\\n{results.params}") print(f"P-values:\\n{results.pvalues}") # Predi...

Details

Author
foryourhealth111-pixel
Repository
foryourhealth111-pixel/Vibe-Skills
Created
3 months ago
Last Updated
1 weeks ago
Language
Python
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category