Say for example that I have the variables: cons inv out ae exp rev int oph lpt , and I do not want to create lags for each one separately (such as gen lag_cons=lag.cons, etc.) because it will take time especially if I have to do that for nearly 20 variables...
I tried :
Code:
local X cons inv out ae exp rev int oph lpt gen lag`X'=lag.`X'
0 Response to Creating lags of many variables all at once
Post a Comment