powered by
Lag a matrix of variables a specific number of lags for each variables.
lag_data(x, lags)
A list with two items
A matrix, lagged with the lagged data.
A list, group, with groupings of the lagged data per variable.
The matrix of variables (one variable per column).
A numeric vector denoting how many lags each variable should have.