Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: saving values from _pctile


From   "Dev Vencappa" <[email protected]>
To   <[email protected]>
Subject   Re: st: saving values from _pctile
Date   Sun, 01 Feb 2004 18:11:42 +0000

I am trying to find the 65th percentile of a variable called relemp using the _pctile and the centile command. Bu they seem to be giving different results. I am not sure if I am wrongly interpreting the function of these two different commands. I typed:

centile relemp if year==1984, centile(65)

and then

_pctile relemp, pc(65)
gen X=r(r1)

The reason I am using the second command is because I have a big panel and wish to obtain the 65th percentile for each year of the panel, save them in a new variable and use them later on. I will write a loop for that eventually but want to make sure why X is different from the result displayed in the centile command.

Can someone enlighten me please?

Many thanks in advance

Dev





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