--- "Rodrigo Alfaro A." <[email protected]> wrote:
> I found an weird outcome using -mean- with weights
> (versions 9 and 10). I just one to know the average
> with its SE. Using -mean- without weights I got the
> same mean and SE as using -reg-. However, when I
> used weights results are not same in terms of SE.
>
> sysuse auto
> set seed 1234
> gen tmp=uniform()
> gen factor=round(1/tmp,1)
> mean price
> mean price [w=factor]
> reg price, nohead
> reg price [w=factor], nohead
That is because the default weight-type differs
between -regress- (analytic weights or aweights) and
-mean- (frequency weights or fweights).
-- Maarten
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room N515
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
*
* 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/