Statalist The Stata Listserver


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

RE: st: question about svy commands


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: question about svy commands
Date   Tue, 7 Mar 2006 17:28:35 -0000

I was aware of -svymean-, as I presume
was the original questioner. Whether 
the questioner is better off cycling 
around -svymean- or doing things some 
other way I cannot say. But, to extend 
what I said, I am not aware of any -egen- function
geared to -svy- problems, which was the original
question. 

David's function _gwtmean does not 
come with a help file and the 
description in the package file is very brief. 
However, looking at the code I see no 
indication that it will treat pweights as such. 

-svy- is unexplored territory to me, so it
really needs an expert to comment further. 

Nick 
n.j.cox@durham.ac.uk 

David Kantor
 
> Nick cox replied, in response to questions from Anant Thaker:
> 
> At 06:13 AM 3/7/2006, you wrote:
> >-egen- always follows a syntax
> >
> >egen newvar = fcn() ...
> >
> >and I am not aware of a -egen- function -svymean()-.
> >
> >[...]
> 
> I would add, at the risk of stating the obvious, that there is a 
> -svymean- command in standard Stata. It has nothing to do with -egen-.
> 
> Also, if you want a weighted mean in an -egen- context, try the 
> _gwtmean package from SSC:
>   ssc desc _gwtmean
>   ssc install _gwtmean
> 
> But, I can say whether any of this is useful for the problem at hand.

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