Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: using weights for means of subgroups of the population


From   "Paolo Naticchioni" <[email protected]>
To   [email protected]
Subject   st: using weights for means of subgroups of the population
Date   Sun, 15 Jul 2007 15:28:46 +0200

dear all,
my question s the following.
I want to create a new variable including the means for some groups
(strata) of the population.
For instance, assume my strata are year, gender, education.

Using egen I can compute the average of some outcome variable, for
instance wage, using the following:

bysort year gender education: egen average=mean(wage)

However, using egen I cannot use any types of weights. I would like to
use weights (weights with average 1). Do you know how can I introduce
weights in a easy way? Probably it is very easy, but I do not know the
command.

Thanks in advance
Paolo
*
*   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