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 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]

st: RE: How can I append tabout output in Excel using logout?


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: How can I append tabout output in Excel using logout?
Date   Wed, 28 Apr 2010 10:59:47 +0100

I'd first pay attention to the suggestions you have received in 

<http://www.stata.com/statalist/archive/2010-04/msg01552.html> 

-- if only because it's possible that the extra condition & `y' hides a
bug in your code. 

But you're probably better off with -collapse- or -statsby-. What do you
want to do in MS Excel that can't be done in Stata? 

Nick 
n.j.cox@durham.ac.uk 

sara khan

I am running a lot of tabstats and need to compare the output in one
Excel sheet. Is there a way of appending the output as there isn't an
append option for logout?

Many thanks,

Here is my code:

forv i=0/5 {
foreach y in male singlet{
forv s=0/1{
di "myga==`i' & `y'==`s'"
qui su bwtg if myga==`i' & intab1==1 & admit_ic==1 & bwtg<. & `y'
	if r(N)!=0{	
 logout, save("C:\data\do_files\mytab.txt")  excel replace: tabstat
bwtg if myga==`i' & intab1==1 & admit_ic==1 & bwtg<., stat(n mean
median p25 p75 min max ) by(`y') col(stat) f(%9.0g) notot nosep

}
}
}
}

*
*   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