Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: outreg2 problem with too many columns in excel


From   "Ghosh, Rebecca" <r.ghosh@imperial.ac.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: outreg2 problem with too many columns in excel
Date   Thu, 18 Aug 2011 16:57:39 +0000

Dear all

I am using outreg2 after a logistic regression to produce tables in excel.  Currently when I produce these tables for the results of several regressions each new odds ratio is in a new column which causes a lot of cutting and pasting in excel to view them properly. Currently the code I am using produces something like this in excel:

                         (1)        (2)	   (3)	 (4)       (5)       (6)		
Exposure1                1.2		1.2
			   (1.1-1.4)     0.005
Exposure2              			   	   1.4	 1.4
						      (0.8-1.6)	0.789         
Exposure3								   	     0.9	   0.9
									        (0.5-1.0)   0.087                       

I am looking at a lot of exposures so having these in an easier to work with format would save a lot of time.  What I am hoping to get is something like this:
                    
                         (1)        (2)	   		
Exposure1                1.2		1.2
			    (1.1-1.4)    0.005
Exposure2                1.4		1.4
			    (0.8-1.6)    0.789         
Exposure3		       0.9	      0.9
			    (0.5-1.0)    0.087


example of code used:

xi:logistic outcome i.exposure  
outreg2 _exposure using "X:\Ever exposure", eform ci excel nonotes append
outreg2 _exposure using "X:\Ever exposure", eform pvalue excel nonotes append
xi:logistic outcome i.exposure2  
outreg2 _exposure2 using "X:\Ever exposure", eform ci excel nonotes append
outreg2 _exposure2 using "X:\Ever exposure", eform pvalue excel nonotes append

Any ideas on whether this is possible? 

Thanks

Becky


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index