Learn R Programming

AutoSEARCH (version 1.01)

gLag: Lag a series

Description

Convenience function particularly suited for the lagging of zoo objects. Also, by default the 'lost' values are padde with NAs so that the length of the series is retained. This is useful in creating the regressor matrices for the GETS model selection

Usage

gLag(y, k=1, na.value=NA)

Arguments

y
numeric vector, time-series or zoo object
k
integer equal to or greater than 1. Default: k=1
na.value
the value to replace the lost values with. Default: na.replace=NA

Value

  • the lagged vector, time series or zoo object