Hi all,
I have multiple dependent variables that I wish to run a fixed effect regression for with the same IV's and same controls. Below is the code I have been trying to use but nothing seems to work. I have tried to use a similar code as the question posed here: https://www.statalist.org/forums/for...s-with-outreg2 and here https://www.statalist.org/forums/for...dent-variables
with this one I get " ' invalid name r(198)"
when I try this:
something runs but nothing appears and when I query the estimates it says "(active results produced by xtreg; not yet stored)"
additionally, I would like to use outreg2 to store the results but I haven't even gotten to that part yet.
thanks for all the help.
I have multiple dependent variables that I wish to run a fixed effect regression for with the same IV's and same controls. Below is the code I have been trying to use but nothing seems to work. I have tried to use a similar code as the question posed here: https://www.statalist.org/forums/for...s-with-outreg2 and here https://www.statalist.org/forums/for...dent-variables
Code:
*list dependent variables local dvs x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12...etc *list independent variables local ivs y1 y2 y3 y4 y5 y6 y7 y8 y9 y10.. etc *list controls local cvs i.Year pop i.RURAL_URBAN_Categorical *Loop DV variables in the regression xtset ID time foreach DV of local dvs { xtreg 'DV' 'ivs' 'cvs', fe }
when I try this:
Code:
xtset ID time local i=1 foreach DV of local dvs { xtreg 'DV' 'ivs' 'cvs',fe estimates store m'i' local 'i'='i'+1 }
additionally, I would like to use outreg2 to store the results but I haven't even gotten to that part yet.
thanks for all the help.
Comment