lagm | R Documentation |
Take the lag of a variable using the specified number of lag(s).
lagm(x, k)
x |
a matrix object |
k |
number of lags |
x |
dimentional matrix with k |
x <- cbind(x1 = c(23, 45, 56, 78, 98, 21, 17),
x2 = c(3, 4, 6, 7, 2, 9, 17))
lagm(x, k = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.