Hi,
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.
Best regards,
Samu Kurri
This mail has been checked for viruses
*
* 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/