Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: saving tabstat results


From   "Clive Nicholas" <Clive.Nicholas@newcastle.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: saving tabstat results
Date   Thu, 4 May 2006 07:49:49 +0100 (BST)

Samu Kurri wrote:

> I need to calculate weighted sums of histograms, using aweights. There
> are around 650 of them, and each of them has data values (h) from  -100
> to +100 (x). The weights w reflect the group weights.
>
> The way how I managed to do it easily is to use tabstat ( tabstat
> h[aweight=w], by(x) stats(sum) )
>
> But how can I save the results efficiently as an independent file?
>
> I tried to use the save command with tabstat ( tabstat h[aweight=w],
> by(x) stats(sum) save ) but have can I retrieve the results and/or
> export them.
>
> I also tried tabexport (SSC-file) but for some reason the results from
> line ( tabexport h[aweight=w] using results.txt , s(sum) by(x)  )
> difffer from the tabstat command.

Have you tried Iain Watson's -tabout-, downloadable by SSC? This may do
what you require.

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: clive.nicholas@ncl.ac.uk
Newcastle University  |http://www.ncl.ac.uk/geps

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index