Bookmark and Share

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]

Re: st: pweights in xtiles command are doing the opposite of what I expect them to do


From   Steven Samuels <[email protected]>
To   [email protected]
Subject   Re: st: pweights in xtiles command are doing the opposite of what I expect them to do
Date   Tue, 1 Feb 2011 16:53:41 -0500

-
Michael--

I don't see a contradiction.  Here's a toy example.
************************
input group x wt
1 4  2
2 5  1
1 8 2
1 9 2
2 10 1
2 12 1
2 13 1
1 20 2
2 21 1
end
pctile p1=x , nq(10)
pctile p2= x [pweight=wt], nq(10)
bys group: sum p* x
sum p*
************************

Steve

Steven J. Samuels
[email protected]
18 Cantine's Island
Saugerties NY 12477
USA
Voice: 845-246-0774
Fax:    206-202-4783

On Feb 1, 2011, at 10:02 AM, Michael Boehm wrote:

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/

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index