helpful function to cumulate information.
cum_lag(x, n_lag)
x
numeric vector for which lag variable should be computed
n_lag
size of lag window
return numeric vector.