lshift {dynamac} | R Documentation |
Take lag transformation of a series
lshift(x, l)
x |
a series to be lagged |
l |
the number of lags |
lshift
assumes that the series are ordered, that there is no missing data, and that the time intervals are even
the lagged series
Soren Jordan and Andrew Q. Philips
x.var <- runif(50)
l.1.x.var <- lshift(x.var, 1)
l.2.x.var <- lshift(x.var, 2)
head(x.var)
head(l.1.x.var)
head(l.2.x.var)