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
how to drop entire household (of two) if at least one household member has at least one missing on all explanatory variablesDear Statalist, each household consists of a man and a woman (female==1). I want to drop every hous…
Dropping rows based on their position related to another rowHello! I'm trying to drop rows based on their position related to another row specified in a compou…
How to remove x axis labels in bar graphsHi I need to make a bar graph in Stata with over 600 categories. Given the large number of categorie…
help with lags and autocorrelationHello!!! So i am trying to choose how many lags to do, and someone helped me with some code but i do…
Finding time trends in each variableI am working with panel data of 311 local authorities over 20 quarters. Is there a simple way to fin…
Subscribe to:
Post Comments (Atom)
0 Response to Create a loop for regressions
Post a Comment