powered by
lagn(y,j,fill=NA) produces lag j of matrix or vector y, with fill in missing j cells REM: alternative to "lead-lag" dplyr which applies to vector y
lagn(y, j, fill = NA)
column vector or matrix
number of lags
value to be used to fill the missing values at the beginning, default = NA
y lagged j cells, with fill in the missing j positions
Berta et al. 2020