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: pweights in xtiles command are doing the opposite of what I expect them to do
From
Michael Boehm <[email protected]>
To
[email protected]
Subject
st: pweights in xtiles command are doing the opposite of what I expect them to do
Date
Tue, 1 Feb 2011 15:02:38 +0000
Dear all,
I am trying to compute students' quantiles in the cognitive skill
distribution using their test results reported in a survey, the
Educational Longitudinal Study (ELS). The ELS oversamples individuals
who are of less privileged social background, which comes with lower
test scores. Therefore, individuals should be higher up in the skill
distribution within the sample than compared to the whole population.
If I adjust for the survey design, using the inverse probability of
being selected for the survey, I however get the opposite result. For
example, I would expect the mean of centil to be below centil1 and
below 50.
xtile centil = F1TXMSTD if G12COHRT != 0 [pweight = F2F1WT], nq(100)
xtile centil1 = F1TXMSTD if G12COHRT != 0 & F2F1WT != 0 , nq(100)
summarize centil centil1
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
centil | 12011 53.20806 28.94271 1 100
centil1 | 12011 50.48081 28.86572 1 100
What am I doing wrong here?
Thanks
Michael
*
* 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/