Hello Statalist!
I am compiling a table of two different regressions using the same dep. var. but alternate independent variables. I want these two independent variables to appear next to each other in the first column ("VARIABLES") of the outreg2 table. This is the code I'm using:
*** BEGIN STATA CODE ***
reg enrolled hh_risk_1 hh_risk_2 age sex, r
outreg2 using enrolledreg, drop(hh_risk_2) tex(fragment) replace
reg enrolled hh_risk_1 hh_risk_2 age sex, r
outreg2 using enrolledreg, drop(hh_risk_1) tex(fragment)
*** END STATA CODE ***
The two independent variables of interest are hh_risk_1 and hh_risk_2. Note that I am using the option drop() in each outreg2 command. What happens is that the variable that is used in the second regression only (hh_risk_2) appears at the bottom row of the table. Initially, only one of the variables was included in each regression, but I included both variables in both regressions and added the drop() option in an attempt to let the variable appear but without the results. This did not work.
I realize it appears in the bottom because it's the last new variable that is identified by outreg2, but I'd really love if someone could help with this simple(?) problem!
To clarify, the left table is how I want it to look, and the right is what outreg2 produces:
VARIABLES VARIABLES
--------- ---------
hh_risk_1 hh_risk_1
hh_risk_2 age
age sex
sex hh_risk_2
Regards,
Mike
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/