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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: collapse with fweights


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: collapse with fweights
Date   Thu, 1 Apr 2010 11:27:31 +0100

This command would collapse to a single observation. Is that what you
really want? 

Nick 
n.j.cox@durham.ac.uk 

Eric Sigurdson


I'm trying to collapse some very tall data, and I would like to
operate on two varlists with the command:

collapse (sum) vars1 (rawsum) vars2 [fw = fweight]

The manual states that the computation of `rawsum' should ignore the
specified weight, but I find that the sum  this command puts out does
not include any of the observations of vars2 for which fweight=0 ,
despite the (rawsum) specification. Is there any way to stop this
behavior, or perhaps some better way to approach processing the data
in this manner?


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