Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Michael Tekle Palm <mickilinen@hotmail.com> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
st: outreg2 to latex and variable placement problem |

Date |
Thu, 9 May 2013 17:33:38 +0200 |

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/

**Follow-Ups**:**Re: st: outreg2 to latex and variable placement problem***From:*John Luke Gallup <jlgallup@pdx.edu>

- Prev by Date:
**Re: st: do-file editor shortcuts** - Next by Date:
**Re: st: complicated twoway graph** - Previous by thread:
**st: interpretation for negative and positive slope combination of interaction term** - Next by thread:
**Re: st: outreg2 to latex and variable placement problem** - Index(es):