Statalist


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

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


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: Transfering a large set of Stata tables into Excel
Date   Tue, 25 Nov 2008 17:24:28 -0500

See
http://repec.org/bocode/e/estout/advanced.html#advanced100
but did you try my approach?

Also: -tabstatmat- combined with -xml_tab- seems to be many users'
preferred method of getting summary stats into Excel.

On Tue, Nov 25, 2008 at 5:16 PM, Rachel <[email protected]> wrote:
> Hi Austin,
>
> I looked into -estout-, but it seems that this command only applies to
> regression results. Is there a way to use it on the output of -su-?
>
> Best,
> Rachel
>
> On Tue, Nov 25, 2008 at 3:55 PM, Austin Nichols <[email protected]> wrote:
>> Rachel <[email protected]>:
>> The -file- command is how I would approach this, but -estout- and
>> -xml_tab- from SSC are also well-suited to this type of task.
>>
>> file open x using tmp.xls, write
>> global Datasets "dataset1 dataset2 dataset35"
>> foreach l of global Datasets {
>>  use `l', clear
>>  file write x _n `"`l'"' _n
>>  foreach v of varlist var1-var3 var8-var11 var17-var25 {
>>  su `v', meanonly
>>  file write x _n "`v'" _tab "`: di %9.3g r(mean)'"
>>  }
>> }
>> file close _all
>> !tmp.xls
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index