Lag/Lead (Shift) Function for Univariate Series
ATA.Shift(x, shift_by, fill = NA)
x
given vector
shift_by
lag or lead parameter
fill
a value to be used to fill the rows
Generating a lag/lead variables