Dear all,
I have a categorical variable that takes six values categ=(1,2,3,4,5,6). I would like to run a regression for each category and append the results into a table.
I am running the following commands as an example:
bysort categ: reg lntrade war alliance
outreg2 using OLScateg.doc, word replace
outreg2 using OLScateg.doc, word append
But this only gives me the table of the last category, where category=6
How can I make a loop that takes each regression result and appends it into a table?
Thanks so much
Best,
Ilona
I have a categorical variable that takes six values categ=(1,2,3,4,5,6). I would like to run a regression for each category and append the results into a table.
I am running the following commands as an example:
bysort categ: reg lntrade war alliance
outreg2 using OLScateg.doc, word replace
outreg2 using OLScateg.doc, word append
But this only gives me the table of the last category, where category=6
How can I make a loop that takes each regression result and appends it into a table?
Thanks so much

Best,
Ilona

Comment