Good morning everybody,
I have a dataset with 150 variables and I would like to create a loop to perform a regression for each of the variables on themselves lagged one period. Something like this for all the variables in my dataset:
Xt=a+B*Xt-1
I would also like to do the same for calculating the ADF test for all the variables in the dataset with the dfuller or dfgls command.
I know that I have to deal with the foreach o forevalues commands but I am not able to do it and it would save me a lot of time.
Thanks in advance
I have a dataset with 150 variables and I would like to create a loop to perform a regression for each of the variables on themselves lagged one period. Something like this for all the variables in my dataset:
Xt=a+B*Xt-1
I would also like to do the same for calculating the ADF test for all the variables in the dataset with the dfuller or dfgls command.
I know that I have to deal with the foreach o forevalues commands but I am not able to do it and it would save me a lot of time.
Thanks in advance
Comment