ldshift | R Documentation |
Take the lagged first difference of a series
ldshift(x, l)
x |
a series to be differenced |
l |
the number of lags |
ldshift
assumes that the series are ordered, that there is no missing data, and that the time intervals are even
the lagged differenced series
Soren Jordan and Andrew Q. Philips
x.var <- runif(50) ld.1.x.var <- ldshift(x.var, 1) ld.2.x.var <- ldshift(x.var, 2) head(x.var) head(ld.1.x.var) head(ld.2.x.var)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.