“gglagplot” will plot time series against lagged versions of themselves. Helps visualising 'auto-dependence' even when auto-correlations vanish.
“gglagchull” will layer convex hulls of the lags, layered on a single plot. This helps visualise the change in 'auto-dependence' as lags increase.
gglagplot(x, lags = 1, set.lags = 1:lags, diag=TRUE, diag.col="gray", do.lines = TRUE, colour = TRUE, continuous = TRUE, labels = FALSE, seasonal = TRUE, ...)
gglagchull(x, lags = 1, set.lags = 1:lags, diag=TRUE, diag.col="gray", ...)
ts
).lag.plot
gglagplot(AirPassengers)
gglagchull(AirPassengers)
gglagplot(AirPassengers,seasonal=FALSE)
lungDeaths <- cbind(mdeaths, fdeaths)
gglagplot(lungDeaths, lags=2)
gglagchull(lungDeaths, lags=6)
Run the code above in your browser using DataLab