Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: outreg2 not giving wide format in MP 11.2


From   Eric Booth <[email protected]>
To   "<[email protected]>" <[email protected]>
Subject   Re: st: outreg2 not giving wide format in MP 11.2
Date   Thu, 11 Aug 2011 20:35:50 +0000

<>

It appears to be an issue with the way multiple logit estimation results are handled by -outreg2- (from SSC by the way) .  When I run your example with -regress- it works in the way you expect , ex:

************
sysuse auto, clear
clonevar for2 = foreign
g i = 1
#delimit;
logit foreign
    mpg turn price headr
      if i == 1, or robust ;
outreg2  using a.xls, replace excel;

logit for2 
    mpg turn price
      if i == 1, or robust ;
outreg2  using a.xls, append excel sortvar(turn price mpg ) see ;
	**try adding the 'sideway' option to see the difference
#delimit cr

#delimit;
reg foreign
    mpg turn price headr
      if i == 1 ;
outreg2  using a.xls, replace excel;


#delimit;
reg for2 
    mpg turn price
      if i == 1 ;
outreg2  using a.xls, append excel sortvar(turn price mpg ) see ;
#delimit cr
************
If this is intentional then I missed it in the help file -- if not, it might be worth emailing the author (Roy Wada) and seeing if he is willing to change this behavior .  If you add the option 'sideway' to the logit -outreg2-, the coefficients line up (but the SE are no longer under the coeff).

  Other options include (1) re-insheeting the .xls tables you made, manipulating the tables (shifting the cells upward to align the coeff. across the rows), and re-exporting them;  (2)  using other table production programs like -estout- or -outreg- from SSC  (3) writing your own program to do what you want.

- Eric
On Aug 11, 2011, at 8:33 AM, Farasat Bokhari wrote:

> I am using outreg2 after a logit command on multiple dependent variables.  No matter what I do, the columns from multiple regressions are not next to each other. I have even tried forcing it by using the "wide" option (which is the default anyway) but the output file does not contain columns next to each other but rather vertically stacked. The prob. has started showing up in my stata 11.2 MP  (was not there in state 10). Any suggestions on how to proceed?
> 
> Thanks.
> 
> example of code used:
> 
> 
> 
> #delimit;
> logit y1
>      x1 x2 x3 x4
>       if useobs == 1, or robust ;
> #delimit;
> outreg  using a.xls, replace excel wide;
> 
> 
> #delimit;
> logit y2 
>      x1 x2 x3
>       if useobs == 1, or robust ;
> #delimit;
> outreg  using a.xls, append excel wide;
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index