Learn R Programming

astsa (version 1.14)

lag2.plot: Lag Plot - two time series

Description

Produces a grid of scatterplots of one series versus another. The first named series is the one that gets lagged.

Usage

lag2.plot(series1, series2, max.lag = 0, corr = TRUE, smooth = TRUE, col = gray(.1), 
           lwl=1, bgl ='white', box.col=8, ...)

Arguments

series1

first series (the one that gets lagged)

series2

second series

max.lag

maximum number of lags

corr

if TRUE, shows the cross-correlation value in a legend

smooth

if TRUE, adds a lowess fit to each scatterplot

col

color of points; default is gray(.1)

lwl

width of lowess line; default is 1

bgl

background of the ACF legend; default is 'white'

box.col

color of the border of the ACF legend; default is 'gray(62)'

additional graphical parameters

References

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 are https://www.stat.pitt.edu/stoffer/tsa4/ and https://www.stat.pitt.edu/stoffer/tsda/.

See Also

lag1.plot

Examples

Run this code
# NOT RUN {
lag2.plot(soi, rec, max.lag=3)
lag2.plot(soi, rec, 8, cex=1.1, pch=19, col=5, bgl='transparent', lwl=2)
# }

Run the code above in your browser using DataLab