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

Re: st: Re: Weighted number of observations


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: Re: Weighted number of observations
Date   Fri, 30 Jul 2004 13:12:15 -0500

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
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc

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