Zum Inhalt springen
Skillpedia
Machine Learning51k · #3578

statsmodels

Was er macht

Dieses Tool hilft dir, Daten mit statistischen Modellen zu analysieren. Es kann Ergebnisse vorhersagen, Hypothesen testen und prüfen, wie gut ein Modell zu deinen Daten passt.

Wann du ihn nutzt

  • ✓Wenn du den Zusammenhang zwischen Variablen verstehen willst.
  • ✓Wenn du einen zukünftigen Wert auf Basis historischer Daten vorhersagen musst.
  • ✓Wenn du testen willst, ob eine Hypothese über deine Daten zutrifft.

Link zum Skill

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/statsmodels/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/statsmodels/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Analysiere diesen Verkaufsdatensatz und sag mir die Verkäufe für den nächsten Monat voraus.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Du gibst deine Daten an und wählst einen Typ statistischen Modells. Das Tool berechnet dann die Ergebnisse des Modells und gibt dir eine ausführliche Zusammenfassung.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Statsmodels: Statistical Modeling and Econometrics

Overview

Statsmodels provides estimation, inference and diagnostics for regression, time series and econometric models. A successful fit establishes numerical execution; causal identification, calibrated uncertainty and model adequacy require a defensible study design and assumptions.

Current Compatibility

Reviewed against statsmodels 0.15.0 (released August 27, 2026). Native checks used Python 3.13, NumPy 2.5.3, SciPy 1.18.1, pandas 3.0.6, matplotlib 3.11.2 and scikit-learn 1.9.1. Install in a dedicated environment:

uv pip install statsmodels==0.15.0 numpy==2.5.3 scipy==1.18.1 pandas==3.0.6 matplotlib==3.11.2 scikit-learn==1.9.1

Use statsmodels.api and statsmodels.formula.api for stable high-level imports, and direct module imports when examples require newer or specialized classes such as HurdleCountModel.

The review and source ledger records API coverage and verification limits. The quick start is executable; topic references are contextual fragments requiring the named data and a matching model result. In 0.15, use result_object=True and named fields for ADF/KPSS and other transitioning tests; prefer rng= where statsmodels formerly accepted seed or random_state.

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, Capabilities, and Model Selection

statsmodels supports inference and prediction, including forecasting. Match validation to the sampling design: grouped splits for repeated units, chronological splits for time series, and preprocessing learned on training data only.

Best Practices

Data Preparation

  1. Specify the intercept: Array OLS/GLM/Logit need an explicit constant; formula models include one by default. OrderedModel and ConditionalLogit must not receive a constant.
  2. Check for missing values: For array-based models, use missing="raise" during construction to catch unexpected NaNs; the default missing="none" does not check and can yield all-NaN estimates. If dropping rows is justified, record retained row IDs and compare models on the same observations. Fit any imputation on training data only.
  3. Scale if needed: Can improve conditioning and convergence; record units and estimate scaling on training data
  4. Encode categoricals: Use formula API or manual dummy coding

Model Building

  1. Start simple: Begin with basic model, add complexity as needed
  2. Check assumptions: Test residuals, heteroskedasticity, autocorrelation
  3. Use appropriate model: Match model to outcome type (binary→Logit, count→Poisson)
  4. Consider alternatives: If assumptions violated, use robust methods or different model

Inference

  1. Report effect sizes: Not just p-values
  2. Use robust SEs: When heteroskedasticity or clustering present
  3. Multiple comparisons: Correct when testing many hypotheses
  4. Confidence intervals: Always report alongside point estimates

Model Evaluation

  1. Check residuals: Plot residuals vs fitted, Q-Q plot

…

Häufige Fragen

Was ist ein statistisches Modell?

Es ist eine mathematische Möglichkeit, den Zusammenhang zwischen verschiedenen Teilen deiner Daten darzustellen.

Was bedeutet 'Diagnostics'?

Gemeint ist die Diagnostik, also die Prüfung, ob das gewählte Modell tatsächlich gut zu deinen Daten passt und ob seine Annahmen gültig sind.

Was ist 'Inference'?

Gemeint ist die Inferenz, also die Schlussfolgerungen, die du auf Basis der Modellergebnisse aus deinen Daten ziehen kannst, zum Beispiel Schätzungen von Effekten oder Angaben zur Unsicherheit.

Details

Originalbeschreibung des Autors

Fits and diagnoses Python statistical models including OLS, GLM, discrete and mixed models, ARIMA and SARIMAX. Supports coefficient inference, marginal effects, model comparison and time series forecasting with explicit design and uncertainty checks. Used for econometrics and statistical modeling; for guided test selection with APA reporting, see statistical-analysis.

repo: K-Dense-AI/scientific-agent-skills

Beliebtheit

GitHub-Sterne
51k
Platz im Ranking
#3578
Lizenz
MIT
Aktualisiert
15.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills