Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Re: Weighted number of observations


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   Re: st: Re: Weighted number of observations
Date   Fri, 30 Jul 2004 14:16:35 -0400

Agreed.

Michael Blasnik
[email protected]

----- Original Message ----- 
From: "Richard Williams" <[email protected]>
To: <[email protected]>
Sent: Friday, July 30, 2004 2:12 PM
Subject: Re: st: Re: Weighted number of observations


> At 01:58 PM 7/30/2004 -0400, Michael Blasnik wrote:
> >This behavior does seem a little unexpected, but the result shown does
match
> >what summarize would show for r(sum) after a weighted summarize
command --
> >the weights are not normalized so the result is inflated by the mean of
the
> >weight .  One work-around is to divide the weight by it's mean (either by
> >transforming the variable or just calculating it's mean)...for example:
> >
> >sum weight
> >scalar meanw=r(mean)
> >tabstat foreign [aw=weight/meanw], stat(sum)
>
> Usually, though, this weighting adjustment is automatically done for you
> with aweights, isn't it?  What is the logic for not doing the adjustment
> with the tabstat sum?  There may well be a good reason, but I have no idea
> what it is.
>
>
> -------------------------------------------
> Richard Williams, Notre Dame Dept of Sociology


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index