Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

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

 From Steven Samuels To statalist@hsphsun2.harvard.edu Subject Re: st: pweights in xtiles command are doing the opposite of what I expect them to do Date Tue, 1 Feb 2011 23:22:48 -0500

```--
```
Sorry, my example didn't represent your data, where the lower ranking group has the smaller weight.
```

Michael--

Steve

Steven J. Samuels
sjsamuels@gmail.com
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/
```