Skip to content

[scatter-lag] Lag Plot for Time Series Autocorrelation Diagnosis #5251

@MarkusNeusinger

Description

@MarkusNeusinger

Description

A lag plot is a scatter plot of a time series against a lagged version of itself (y(t) vs y(t-k)). If the data is random, points scatter uniformly; if autocorrelated, they form patterns (linear for AR processes, elliptical for seasonal). This is a quick visual diagnostic tool complementing the existing acf-pacf spec.

Applications

  • Checking for autocorrelation before applying regression models
  • Diagnosing stationarity in financial time series
  • Identifying seasonal patterns in sensor data
  • Validating residual independence after model fitting

Data

  • value (float) — time series values
  • lag (int) — lag order k (default 1)
  • Size: 100–5000 observations

Notes

  • Default lag = 1, but should support configurable lag
  • Add diagonal reference line (y = x) for visual comparison
  • Points colored by time for temporal context (optional)
  • Strong linear pattern = high autocorrelation at that lag

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions