Logo von Econometric Diagnostics

Econometric Diagnostics

Organisation
bis-med-it
econometric-diagnostics

Residual diagnostics and model adequacy checks for VAR/BVAR models. Use when the orchestrator reaches the diagnostics step of Stage 4 (estimation), whose results feed the Stage 5 sensibility check, or when the user asks to check residuals, test for autocorrelation, heteroskedasticity, normality, or structural breaks.

Übersicht

Herausgeberbis-med-it
Repositorymarco-BIS
Skill-Nameeconometric-diagnostics
Sterne
28
Forks
6
Mitgelieferte Dateien
Nur Anweisungen
LizenzApache-2.0
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von bis-med-it auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Econometric Diagnostics in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/bis-med-it/marco-BIS/tree/main/skills/diagnostics
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bis-med-it/marco-BIS.git /tmp/marco-BIS
mkdir -p .claude/skills
cp -r /tmp/marco-BIS/skills/diagnostics .claude/skills/econometric-diagnostics
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Econometric Diagnostics in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Econometric Diagnostics automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Econometric Diagnostics nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Econometric diagnostics

Tests performed

Built-in bundle. lib.diagnostics(fit) provides:

  • per equation: Ljung-Box (one or more lags), Jarque-Bera and ARCH-LM;
  • system level: the maximum companion-matrix eigenvalue modulus, with a status label (stability);
  • an AIC/BIC/HQ lag-order comparison: it refits an OLS VAR at p = 1..max_lag_search and reports which p each criterion picks.

The other tests below are marked additional. They are not part of the built-in bundle; the agent can run them separately (e.g. via statsmodels) when the question calls for them.

Residual-level diagnostics

For each equation in the VAR system:

  1. Autocorrelation. Ljung-Box test at lags 4, 8, 12 (quarterly) or 6, 12, 24 (monthly). (lib.diagnostics(fit, lb_lags=[...]) computes all requested lags in one call; the report's diagnostics table labels each row with the lag actually used.) Additional: Breusch-Godfrey LM test for the system.
  2. Heteroskedasticity. ARCH-LM test (Engle, 1982) to detect conditional heteroskedasticity. Additional: White test for unconditional heteroskedasticity.
  3. Normality. Jarque-Bera test per equation. Additional: Lomnicki-Jarque-Bera for the system. Note: non-normality is common in macro data and is not a reason to reject the model unless extreme.

System-level diagnostics

  1. Stability. Companion matrix eigenvalues. Report the maximum root and classify the dynamics as stationary (below 1), unit-root (at 1 within sampling error) or explosive (above 1). Apply the declared model-class and replication criteria consistently, treat near-unit-root sampling uncertainty as a disclosed diagnostic, and do not certify stability from finite-horizon plots. (lib.diagnostics reports the maximum modulus; plotting the eigenvalues on the unit circle diagram is an additional step.) Arbitration for LEVELS systems: lib.diagnostics labels any max |eig| ≥ 1.0 "non-stationary / unstable", but a VAR in log-levels (or with a random-walk Minnesota prior) legitimately sits at or just above the unit circle; several canonical replications validate against an expected band like 1.0 ± 0.05. Reconcile in this order: (i) does the spec intend unit-root-like persistence (levels + shrinkage)? then near-1 is expected, not a failure; (ii) apply the Stage-5 standard for the IRFs: responses to transitory shocks should die out and responses to permanent shocks flatten to a finite limit; growth at long horizons is a failure signal, but a flat-looking response within a finite horizon does not show that a root above one is stable; (iii) treat the lib label as a prompt to run checks (i)-(ii) and to disclose the classification, never as an auto-reject or an auto-pass.
  2. Lag-order comparison. AIC, BIC and HQ picks across p = 1..max_lag_search (built in; a pick that differs from the fitted p is listed in the warnings).
  3. Granger causality (additional). Wald tests for block exogeneity. Useful for interpreting the system structure.
  4. Lag exclusion (additional). Joint significance of each lag across all equations.
  5. Set-identified models: acceptance rate. For sign/zero-restriction schemes, track accepted draws / attempts against the canonical run or the entry's expected range (the Uhlig replication validates ~0.06 ± 0.04). Low acceptance or a missed target_accepted quota is a computational and precision warning. Acceptance depends on the number of variables, the restrictions, the proposal measure and the sampler, so compare like with like, inspect the accepted and effective draw counts, and check stability separately. Do not infer invalid restrictions from a universal acceptance threshold, and do not silently report results from too few accepted draws.

Structural break detection (optional, additional)

  1. CUSUM and CUSUM-of-squares tests.
  2. If the sample is long, consider a split-sample stability check at known break dates (e.g., 1979Q4 for Volcker, 2008Q3 for GFC).

Scope note: statistical vs economic anomalies. This skill covers the statistical gate. Economic anomalies (price puzzle, wrong-signed responses, implausible magnitudes) are Stage-5 territory: the remedy ladder lives in skills/specification/SKILL.md §"Iterative revision after failed sensibility checks". Go there, not here, when the numbers are statistically clean but economically wrong.

Output format

For the research log, record lib.diagnostics(...).to_log_dict(), plus any additional tests run separately and the agent's recommendation:

diagnostics:
  residuals:                                  # keyed by variable name
    M1:
      ljung_box: {4: {stat, p_value}, 8: ..., 12: ...}   # keyed by lag
      jarque_bera_stat, jarque_bera_pvalue
      arch_stat, arch_pvalue
      breusch_godfrey: {stat, p_value}        # additional; only if run separately
  stability: {max_eigenvalue_modulus, stable: bool, status}   # status: stationary | marginal (near unit root) | non-stationary / unstable
  lag_selection: {current_p, max_lag_search, aic_recommended, bic_recommended, hqic_recommended}
  portmanteau: {stat, p_value, lags}          # additional; only if run separately
  eigenvalues: list of complex numbers        # additional; only if run separately
  warnings:                                   # lib.diagnostics(...).warnings
    - "Autocorrelation detected in M1 equation at lag 4 (p=0.02)"
    - "ARCH effects in GNP deflator equation"
  recommendation: "Consider increasing lag order or adding conditional heteroskedasticity"   # written by the agent; not a lib field

For the report, do not build the table by hand. VARReport.add_standard_sections passes the fit's DiagnosticReport through the report layer's adapter (_build_diagnostics_dict_from_report in scripts/lib/report.py). A direct call to VARReport.add_diagnostics takes a reduced view, keyed by variable name with numeric Ljung-Box lags:

yaml
per_equation:
  M1:
    ljung_box:
      4: {p_value: 0.30}
      8: {p_value: 0.40}
    arch_lm: {p_value: 0.50}
    jarque_bera: {p_value: 0.60}
system:
  stability:
    max_eigenvalue_modulus: 0.90
    note: stationary

Additional tests, warnings and recommendations stay in the log; the report table shows only these fields.

Propose → confirm (handing back to Stage 5 / Stage 4)

When presenting results to the user, lead with whether the model passes or fails in plain language. Diagnostics never silently re-specifies the model. On a critical failure (instability, or severe autocorrelation indicating misspecification):

  1. State the failed test in plain language and why it matters economically, e.g. "the companion matrix has a root at 1.02, so the VAR is explosive and impulse responses won't die out."
  2. Propose one specific remedy with rationale, drawn from the usual levers (+1 lag, reorder / add a variable, tighten the prior, shorten the sample), e.g. "I propose adding a 5th lag; the Ljung-Box failure at lag 4 points to unmodelled own dynamics."
  3. Wait for the user to confirm or override before routing back to Stage 4 for re-estimation. (The orchestrator's 5-iteration automatic budget covers only implementation/data-error fixes and pre-specified statistical rules; economically substantive revisions like this one are each gated.)

For soft warnings (mild non-normality, marginal ARCH), state them and recommend proceeding; don't block. Either way the flag and its disposition are logged via the research-log skill. Never auto-respecify without surfacing the choice. This is design principle 3 (active suggestion, human confirmation) applied to diagnostics.

Häufig gestellte Fragen

Was macht der KI-Skill Econometric Diagnostics?

Residual diagnostics and model adequacy checks for VAR/BVAR models. Use when the orchestrator reaches the diagnostics step of Stage 4 (estimation), whose results feed the Stage 5 sensibility check, or when the user asks to check residuals, test for autocorrelation, heteroskedasticity, normality, or structural breaks.

Warum Econometric Diagnostics in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Econometric Diagnostics besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Econometric Diagnostics in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/bis-med-it/marco-BIS/tree/main/skills/diagnostics ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Econometric Diagnostics nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Econometric Diagnostics verwenden?

So viele Sie möchten. In TypingMind können Sie Econometric Diagnostics mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Econometric Diagnostics kostenlos?

Ja. Der Skill wird von bis-med-it auf GitHub unter der Lizenz Apache-2.0 veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇