Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: Generating a new variable containing the percentile for each observation


From   "Ben Jann" <[email protected]>
To   [email protected]
Subject   Re: st: RE: Generating a new variable containing the percentile for each observation
Date   Wed, 26 Sep 2007 23:06:06 +0200

Withdrawn or not, to me this looks like a job for -cumul- followed by
-invcdf- (type -ssc describe invcdf-).
ben

On 9/26/07, David Haardt <[email protected]> wrote:
> As a follow-up to the message I just sent:
>
> I should have remembered that xtile is what I was looking for in the first
> step. Please regard my original message as withdrawn.

On 9/26/07, David Haardt <[email protected]> wrote:
> Dear Statalisters,
>
> I have two variables s20 and s10 -- essentially, these are test scores with
> a time break. In earlier years, the test was carried out on a 20-point
> scale, and afterwards on a 10-point scale.
>
> I would like to convert the 20-point results to 10-point results by using
> percentiles. Basically, if somebody scored in the 80th percentile using the
> 20-point scale, I would like to replace the missing s10 value by the value
> equal to the 80th percentile when using the 10-point scale.
>
> What would be the easiest way to do this?
>
> I know about pctile and xtile, but am looking for a command that, for each
> observation of s20, tells me the percentile of this score. In the second
> step, I would then identify which value in s10 corresponds to that
> percentile, perhaps by using _pctile
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index