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/