lagged_features | R Documentation |
Covariate lagged replication for temporal dependence
lagged_features(X, max_lag, drop_present = TRUE)
X |
Covariate matrix. |
max_lag |
Integer giving the maximum lag (i.e. the number of temporal dependence steps). |
drop_present |
Whether to drop the "present" features (bool). |
Matrix with the original columns replicated, and shifted by 1:max_lag
if drop_present==TRUE
(default)
or by 0:max_lag
if drop_present==FALSE
.
lagged_features(matrix(seq(20), ncol=2), max_lag=3, drop_present=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.