Arnold Levinson <[email protected]> asks the following:
> When requesting svy-adjusted means over population classes, is there a way
> to include the overall mean in the output, or must it be requested
> separately?
The overall mean is not directly computed by -svy: mean- when the -over()-
option is specified, thus there is no way to get -svy: mean- to report it
without using -svy: mean- to estimate it directly.
However, if Arnold is building a custom table using something like -estout-,
he can compute the overall mean using the estimation results at hand.
Here is an example using the auto data:
. * estimate some subpopulation means
. sysuse auto
. svyset rep78 [pw=weight], strata(for)
. gen subpop = mod(_n-1,5) + 1
. svy: mean mpg, over(subpop)
. * use the results to compute the overall mean and list it
. matrix overallmean = e(b)*e(_N_subp)'/e(N_pop)
. matrix list overallmean
. * visually verify that we got the correct answer
. svy: mean mpg
Cheers,
--Jeff
[email protected]
*
* 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/