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
Related Posts with Create a loop for regressions
Loop issuesHi everyone. I have a dataset with this structure: date a1 a2 a3 a4 a5 example example_bis 01/0…
Putexcel with local macroHi, I was wondering whether anyone could help me out with my code. I used the svy: proportion metho…
Random selection of first diagnosis code from the register dataDear all, I am working on the register-based cancer study. For the study, I would like to select on…
Local storing string content not workingHi, I would like to take the levels of a variable (string) in one file and use that list to loop thr…
Pesaran’s test, Modified Wald test, Wooldridge test | Panel dataHi, I have an unbalanced panel data. I tried Poolability test, Breushch-Pagan LM, Hausman; hence Fi…
Subscribe to:
Post Comments (Atom)
0 Response to Create a loop for regressions
Post a Comment