Learn R Programming

gamlss.util (version 4.3-4)

lagPlot: Lag plot for time series data

Description

The function lagPlot() plots a time series variable against its lagged values or against the lagged values of an explanatory variable.

Usage

lagPlot(y, x = NULL, lags = 0, corr = TRUE, smooth = TRUE)

Arguments

y
time-series (univariate)
x
explanatory variable
lags
number of lag plots desired
corr
whether to include the coirrelation in the plot
smooth
whether to plot the smooting curve

Value

A plot is produded.

Details

The function uses the functions lag.plo1() and lag.plo2() desribed in Shumway and Stoffer (2011) page 56.

References

Shumway R. H. and Stoffer D. S. (2011) Time Series Analysis and Its Applications, With R Examples. (third edition), Springer, New York, .

See Also

lag.plot

Examples

Run this code
dax<-EuStockMarkets[,"DAX"]
ftse<-EuStockMarkets[,"FTSE"]
lagPlot(dax, lags=9)
lagPlot(dax, ftse, lags=8)

Run the code above in your browser using DataLab