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]

Re: st: collapse with fweights


From   Steve Samuels <sjsamuels@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: collapse with fweights
Date   Thu, 1 Apr 2010 10:44:57 -0400

I think that is the proper behavior. A  frequency  weight of zero is
special: it implies that there is _no_  observation with the variable
value combination recorded on the data line.*  If that's not true,
then do a separate -collapse, sum- on "vars2" without the [fw] option
and -merge- with the result of the other -collapse-.

*There is a similar justification for ignoring zero values of the
other kinds of weights.

Steve


On Wed, Mar 31, 2010 at 3:33 PM, Eric Sigurdson
<eric.sigurdson@colorado.edu> wrote:
>
> 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?


-- 
Steven Samuels
sjsamuels@gmail.com
18 Cantine's Island
Saugerties NY 12477
USA
Voice: 845-246-0774
Fax:    206-202-4783

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