Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Different ways of finding the mean of survey data
From
<[email protected]>
To
<[email protected]>
Subject
st: Different ways of finding the mean of survey data
Date
Mon, 2 Dec 2013 12:08:42 +0000
Hi Stata users,
I am working with survey data and at this stage I just would like to produce mean and median stats.
I have noticed a difference in means for variable x when using either of the following command sequences:
svyset id [pweight=pweight], strata(strata)
followed by (1) or (2):
(1) mean x [pweight=pweight]
(2) svy: mean x
I initially used (2) but then I found the following advice for computing the median in the FAQs:
_pctile x [pweight=pweight], p(50)
gen median_x=r(r1)
This led me to try (1) to verify that I get the same result for the mean as in (2) - and I do not. Then: if "svy: median x" existed, it would give a different result. Why would this be a valid method for computing the median if (1) is not a valid method for computing the mean?
Any help in clarifying this is very much appreciated!
Isabelle
Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer
*
* 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/