Dear Listers,
As shown below, I am using foreach loop twice. I try to write out the output . I know my estout `y' is incorrect, in the sense that it is not saving all the regression outputs, only the last dependent varaible referred in the y.
Can someone point out my error and make edits to my code? I get confused using double foreach loop.
Thanks,
rochelle
As shown below, I am using foreach loop twice. I try to write out the output . I know my estout `y' is incorrect, in the sense that it is not saving all the regression outputs, only the last dependent varaible referred in the y.
Can someone point out my error and make edits to my code? I get confused using double foreach loop.
Thanks,
Code:
foreach x in ar net { foreach y in fd1_`x' fd2_`x' fd3_`x' fd3y_`x'{ xtreg `y' $ctrl , fe cluster(firmid) est store `y' , title(`y' ) } estout `y' using "ResultsTables\out_`x'.rtf" , replace style(fixed) }
Comment