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]

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


From   sara khan <sarakhanum84@googlemail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: How can I append tabout output in Excel using logout?
Date   Wed, 28 Apr 2010 11:09:04 +0100

Dear Nick

Many thanks for your suggestion yesterday. Apologies that I didn't
read this yesterday.

I am now trying to export the tabstat output into Excel using
-logout-. I added this to command to my code from yesterday (which I
will update using your helpful suggestions). Logout doesn't seem to
append each additional table.

Regards

Sara

On Wed, Apr 28, 2010 at 10:59 AM, Nick Cox <n.j.cox@durham.ac.uk> wrote:
> 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/
>

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