跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
开发与测试

time-series-diagnostics

Diagnostics for regressions on trending or highly persistent time series: unit-root order (opposite-null), cointegration (residual, system, reversed-null, break-robust), the Granger–Newbold R²-vs-Durbin–Watson fingerprint, Prais–Winsten and first-difference coefficient survival, an order-agnostic ARDL/ECM bounds test, out-of-sample validation, and calibrated size/power. Invoke from `code-and-data` whenever a headline or mechanism result regresses one time-indexed level on another.

isitcredible · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add isitcredible/research_skills --skill time-series-diagnostics

技能说明


name: time-series-diagnostics description: >- Diagnostics for regressions on trending or highly persistent time series: unit-root order (opposite-null), cointegration (residual, system, reversed-null, break-robust), the Granger–Newbold R²-vs-Durbin–Watson fingerprint, Prais–Winsten and first-difference coefficient survival, an order-agnostic ARDL/ECM bounds test, out-of-sample validation, and calibrated size/power. Invoke from code-and-data whenever a headline or mechanism result regresses one time-indexed level on another.

Time-series diagnostics

A levels regression of one trending or highly persistent series on another can produce a large, precise coefficient, a high R², and conventional significance even when the series are unrelated. Independent persistent processes drift together for long stretches; OLS mistakes the common drift for a relationship and the residual stays near a unit root (Granger–Newbold 1974; Phillips 1986). A deterministic trend does not remove a stochastic one, and a near-perfect in-sample fit is a product of a spurious regression, not evidence against it. Drift does not rescue it either: two I(1) series WITH drift produce a nonsense regression in which OLS converges to the ratio of the drifts (Entorf 1997) — a stable coefficient equal to the trend ratio is the mechanism of the spuriousness, not an escape from it, and a stable γ across subsamples does not discriminate — a cointegrated relation is stable too. The levels-residual Durbin–Watson is a screen, not a discriminator: it goes to 0 under spuriousness asymptotically, but at short T a slowly adjusting cointegrated relation also leaves a low DW — cointegration tests with correct critical values decide; a first-difference R² near zero is consistent with spuriousness, not proof of it; high levels R² and a huge t are produced ~always by unrelated series and discriminate nothing.

Your job is to establish whether the reported levels relationship is a genuine long-run equilibrium (the series are cointegrated) or an artefact of shared persistence — and to reach that verdict from convergence across tests with different identifying information, never from a single unit-root classification.

Trigger

Fire this module when any target result family regresses time-series levels on time-series levels and the series trend or are highly persistent — aggregate GDP, prices, wages, skill premia, money, population, national ratios, indices, market-integration price gaps, or any structural/calibrated model fitted to trending aggregates over time. It fires alongside other modules: a dynamic panel of GDP over time is both panel-diagnostics (cross-unit dependence) and this module (within-unit persistence); a market-access design with a price series over time is both cross-sectional-diagnostics and this.

Do NOT fire it for a pure spatial cross-section, a geographic RDD, or a DiD/event study with no aggregate time-series relationship in levels — those carry a spatial dependence problem, handled by the spatial implementation record, not this one. The two spurious-regression problems are analogues but distinct: Müller–Watson's spatial tests (the Becker–Boll–Voth SPUR port, and SCPC) are the spatial battery, never a substitute for the temporal one here.

The full source-audited protocol this module compresses is ../../references/methods/spurious_regressions_guide.md; the space–time correspondence and the spatial analogues are in ../../references/methods/spurious_space_time_unified_guide.md.

Decision rule

Treat the levels regression as unvalidated until the integration order of the outcome, each stochastic regressor, and the regression residual has been established, and the cointegration question answered. If outcome and regressor(s) are I(1), the levels coefficient has a coherent long-run reading only if the residual is I(0) — i.e. they are cointegrated. Cointegration is the escape hatch; without it the right model is normally in differences and the levels t, SE, and R² do not mean what they appear to.

No conclusion may rest on a unit-root or cointegration test failing to reject its null. These tests have low power at the sample lengths economic history supplies. Non-rejection of a unit root is not proof of one; non-rejection of no-cointegration is not proof of no long-run relation. The strongest diagnosis does not depend on any single I(0)/I(1) call.

Core checks

Preserve the paper's exact sample, transforms, deterministic terms, break dates, and lag conventions before touching anything. Plot every series and the levels residual. Record irregular spacing and missing years — annual unit-root methods require a genuinely consecutive series, not benchmark observations treated as adjacent (a common economic-history failure).

  1. Integration order — opposite nulls. ADF and Phillips–Perron (H0: unit root) and KPSS (H0: stationarity), on each series in levels and first differences, with deterministic terms matched to the claim (constant vs constant+trend) — then run the other deterministic case as a sensitivity: a classification that flips on constant vs constant+trend is not established either way and is reported as such. I(1) requires the level nonstationary AND the first difference stationary — test the difference too, to rule out I(2). Add Zivot–Andrews (one endogenous break) to answer the "it's stationary around a break" objection; report the selected date and use break-valid critical values. Classify the evidence, not the series: convergent only when ADF/PP fail to reject while KPSS rejects (or vice versa); if both fail to reject, the sample is uninformative — say so and lean on the order-agnostic tests below; and if both REJECT (no unit root AND no stationarity — the signature of breaks, nonlinearity, or fractional integration), the evidence is likewise unresolved: investigate breaks/nonlinearity
阅读完整来源 ↗