# How to convert percentile rank into z score in R

I have a vector of percentile ranks. I want to convert them into z-scores, so it will be interval scale. I have to do it in R, but I could not find a function or package that can do this. Does anyone have any idea?

• Why do you think something that converts percentile ranks into something that's nominally a z-score will leave you with an interval scale? Commented Jul 18, 2013 at 1:42
• @Glen_b is right about this, although in this case the title of your question may be quite accurate; and this is a COVERT action. Can you share, or do you have any information on the raw data as far as distribution? Commented Jul 18, 2013 at 2:25
• Title changed to "convert". I doubt OP was trying for word play here. Commented Jul 18, 2013 at 8:38
• Use the qnorm function. Commented Jul 18, 2013 at 8:44

You would apply the inverse cdf to the percentile ranks to convert them to quantiles, so if you want standard normals, $z=\Phi^{-1}(p)$ should do what you seem to be asking for.

However, this transformation won't of itself make an ordinal scale into an interval scale.

In R, you would do this as:

z <- qnorm(p)

x <- c(1 , 1.1 , 1.2) #your z-values in a vector


pnorm(x) will give the area to the left of the Z-value, which is the percentile. This function can take a vector as an input.

• This seems to be the opposite of what is being asked for: the input is supposed to be the percentile ranks and the output will be the Z-scores.
– whuber
Commented Nov 12, 2014 at 18:57