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

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

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

Subject |
Re: st: Transfering a large set of Stata tables into Excel |

Date |
Tue, 25 Nov 2008 23:46:38 +0100 |

Rachel, you might want to use !start tmp.xls

HTH Martin _______________________

To: <statalist@hsphsun2.harvard.edu> Sent: Tuesday, November 25, 2008 11:40 PM Subject: RE: st: Transfering a large set of Stata tables into Excel

Austin didn't spell this out, so I will. Once you want the sd too, you no longer can get away with the -meanonly- option of -summarize-. -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Austin Nichols Sent: 25 November 2008 22:35 To: statalist@hsphsun2.harvard.edu Subject: Re: st: Transfering a large set of Stata tables into Excel Try e.g. file open x using tmp.xls, write replace local sets "cancer nlswork psidextract" foreach d of local sets { webuse `d', clear file write x `"`d'"' _n _tab "Mean" file write x _tab "SD" _tab "Min" _tab "Max" foreach v of varlist _all { qui su `v' file write x _n "`v'" _tab (r(mean)) file write x _tab (r(sd)) file write x _tab (r(min)) file write x _tab (r(max)) } file write x _n _n } file close _all !tmp.xls On Tue, Nov 25, 2008 at 5:27 PM, Nick Cox <n.j.cox@durham.ac.uk> wrote:See -help extended_fcn- and -help summarize- then. Nick n.j.cox@durham.ac.uk Rachel One more question: How would I modify the line: file write x _n "`v'" _tab "`: di %9.3g r(mean)'" if I wanted the mean, standard deviation, max and min of each variable on a separate line? I'm sure I can find this in my data manual, but unfortunately, I've loaned it out.* * 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/

**Follow-Ups**:**st: Generate trend variable in stata***From:*Diana Eastman <deastman@gma-us.com>

**References**:**st: Transfering a large set of Stata tables into Excel***From:*Rachel <academicgirl@gmail.com>

**Re: st: Transfering a large set of Stata tables into Excel***From:*"Austin Nichols" <austinnichols@gmail.com>

**Re: st: Transfering a large set of Stata tables into Excel***From:*Rachel <academicgirl@gmail.com>

**RE: st: Transfering a large set of Stata tables into Excel***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**Re: st: Transfering a large set of Stata tables into Excel***From:*"Austin Nichols" <austinnichols@gmail.com>

**RE: st: Transfering a large set of Stata tables into Excel***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**RE: st: Transfering a large set of Stata tables into Excel** - Next by Date:
**st: Generate trend variable in stata** - Previous by thread:
**RE: st: Transfering a large set of Stata tables into Excel** - Next by thread:
**st: Generate trend variable in stata** - Index(es):

© Copyright 1996–2021 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |