I am trying to output the ttable2 results of different groups. The code I am writing is as follows:
Code:
foreach group of grouplist new1 sand sean female highschool{ logout, save (E:\Data\stata\des_new\`group') excel replace: ttable2 weight long education numest perc, by(`group') }
I have no problem to run:
Code:
logout, save (E:\Data\stata\des_new\new1) excel replace: ttable2 weight long education numest perc, by(new1)
0 Response to Invalid syntax error when combining foreach and logout ttable2
Post a Comment