Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: use egen functions to get survey weighted means


From   "HUANG, LILING" <HUANGL@mailbox.sc.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: use egen functions to get survey weighted means
Date   Fri, 30 Nov 2012 19:16:55 +0000

Dear Statalisters,

I would like to creates a new variable that contains survey weighted mean estimates of one variable. The egen command does not seem to support such a function. Could you please let me know how to get this resolved?

. egen meanrank = svy:mean(rank) if x==1 & y==1 & z==1
unknown egen function svy:mean()

Your prompt assistance will be greatly appreciated.

Liling Huang
Graduate student
School of Public Health
University of South Carolina
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index