lag_mts | R Documentation |
This function lags a set of variables in a matrix, each with a separate index. It is also possible to retain only the last lag order.
lag_mts(X, k, last.only = F)
X |
numeric matrix whose columns are subject to lagging |
k |
vector of lag orders |
last.only |
If TRUE only the k-th order lag will be computed, otherwise all lags from 1 to k |
a matrix whose columns are the original variables and the k-th order lagged variables. Column name suffix ".lx".
data(ger_macro) lag_mts(X = ger_macro, k = 3, last.only = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.