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

From |
David Haardt <haardtd@mcmaster.ca> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: Generating a new variable containing the percentile for each observation |

Date |
Wed, 26 Sep 2007 15:36:13 -0400 |

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 I would be grateful for any suggestions you may have. Best wishes, David -- David Haardt <haardtd@mcmaster.ca> Department of Economics, McMaster University 1280 Main St W, Hamilton, ON, Canada L8S 4M4 T: (905) 525-9140 X 23218; F: (905) 521-8232 * * 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/

- Prev by Date:
**st: RE: Generating a new variable containing the percentile for each observation** - Next by Date:
**Re: st: RE: Generating a new variable containing the percentile for each observation** - Previous by thread:
**st: RE: Generating a new variable containing the percentile for each observation** - Next by thread:
**st: cureregr update** - Index(es):

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