lagPlot: Lag plot for time series data

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/lagPlot.R

Description

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

Usage

1
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

Details

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

Value

A plot is produded.

Author(s)

Mikis Stasinopoulos

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

1
2
3
4
dax<-EuStockMarkets[,"DAX"]
ftse<-EuStockMarkets[,"FTSE"]
lagPlot(dax, lags=9)
lagPlot(dax, ftse, lags=8)

Example output

Loading required package: gamlss.dist
Loading required package: MASS
Loading required package: gamlss
Loading required package: splines
Loading required package: gamlss.data
Loading required package: nlme
Loading required package: parallel
 **********   GAMLSS Version 5.0-2  ********** 
For more on GAMLSS look at http://www.gamlss.org/
Type gamlssNews() to see new features/changes/bug fixes.

Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

gamlss.util documentation built on May 29, 2017, 8:58 p.m.