powered by
Create a lag variable, with a choice of lag periods. The lag variable can be used to test lag effects between variables.
flag(x,n)
:a vector
:number of lag periods
# NOT RUN { flag(mtcars[,2],3) # }
Run the code above in your browser using DataLab