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
Exporting Mean/Median of Variable X by variables Y and ZI am using data from the IPUMS-CPS ASEC series. I am looking to calculate the median income for each…
Lasso inference for cox regressionDear STATA team, I hope all is well. I was trying to do lasso inference for survival ,model. The va…
How to combine SDC Platinum/ThomsonOne with CRSP?I have a dataset from SDC containing 127 000 M&A bids, including announcement date, year, compan…
convert time variable from; 'Jan 2018' to 'Jan'I want add a time variable that only shows the months in this format; 'Jan', 'Feb', .. So I have 2 t…
Exporting Mean/Median of Variable X by variables Y and ZI am using data from the IPUMS-CPS ASEC series. I am looking to calculate the median income for each…
Subscribe to:
Post Comments (Atom)
0 Response to Create a loop for regressions
Post a Comment