Hi all!
I need to do regression with lots of different dependent variables and so I am using a loop.
My baseline regression looks something like this:
yit = β0 + β1 x1it + β2x2it + εit
My code so far is
local educationVars = "educ1 educ2 educ3 educ4"
foreach var of local educationVars {
reg `var' x1 x2
outreg2 using education.doc, replace ctitle(baseline)
}
Now this gives me four regression tables and what I want is for outreg2 to put them all in one document one after the other - not appended in the same table or replace like I have in my code at the moment!
Is this possible and if so anyone knows how?
Any help would be greatly appreciated!!
I need to do regression with lots of different dependent variables and so I am using a loop.
My baseline regression looks something like this:
yit = β0 + β1 x1it + β2x2it + εit
My code so far is
local educationVars = "educ1 educ2 educ3 educ4"
foreach var of local educationVars {
reg `var' x1 x2
outreg2 using education.doc, replace ctitle(baseline)
}
Now this gives me four regression tables and what I want is for outreg2 to put them all in one document one after the other - not appended in the same table or replace like I have in my code at the moment!
Is this possible and if so anyone knows how?
Any help would be greatly appreciated!!
Comment