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
Using CRSP to calculate the Cumulative Abnormal ReturnHello everyone, This is a very noob question, I am trying to get the quarterly CAR. However, my sch…
Plot the estimated hazard curve at mean-1*SD mean, and mean+1*SD after fitting survival analysis using Stata.Hi, everybody, I have a dataset like this, * Example generated by -dataex. clear input int id int ti…
Unbalanced Panel - Structural BreaksI have an unbalanced panel dataset. I am looking to do structural break analysis and came across xtb…
True Random Effect GreeneDear sir, Recently i've been trying using SFA to determine the efficiency of Gov't Spending. Im usi…
45-Degree Line with MarginsplotDear all, I am trying to add a diagonal/45-degree line to my marginsplot, but (function y=x, ...) do…
Subscribe to:
Post Comments (Atom)
0 Response to Create a loop for regressions
Post a Comment