powered by
Produces a grid of scatterplots of one series versus another lagged. The first named series is the one that gets lagged.
lag2.plot(series1, series2, max.lag = 0, corr = TRUE, smooth = TRUE, col = gray(.1), bg = NA, lwl = 1, lwc = 2, bgl = NULL, ltcol = 1, box.col = NULL, cex = .9, gg = FALSE, ...)
first series (the one that gets lagged)
second series
maximum number of lags
if TRUE, shows the cross-correlation value in a legend
if TRUE, adds a lowess fit to each scatterplot
color of points; default is gray(.1)
gray(.1)
background color for filled plot characters
width of lowess line; default is 1
color of lowess line; default is 2 (red)
background of the ACF legend; default is semitransparent
legend text color; default is black
color of the border of the ACF legend; default matches type of plot
size of points; default is .9
if TRUE, will produce a gris-gris plot (gray graphic interior with white grid lines); the default is FALSE. The grammar of astsa is voodoo
additional graphical parameters
D.S. Stoffer
You can find demonstrations of astsa capabilities at FUN WITH ASTSA.
The most recent version of the package can be found at https://github.com/nickpoison/astsa/.
In addition, the News and ChangeLog files are at https://github.com/nickpoison/astsa/blob/master/NEWS.md.
The webpages for the texts and some help on using R for time series analysis can be found at https://nickpoison.github.io/.
lag1.plot
lag2.plot(Hare, Lynx, max.lag=5, lwl=2, lwc=3, cex=1.5, pch=24, bg='orange') lag2.plot(soi, rec, 8, cex=1.1, pch=19, col=5, lwl=2)
Run the code above in your browser using DataLab