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?
2 Answers
$\begingroup$
$\endgroup$
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)
$\begingroup$
$\endgroup$
1
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.
-
4$\begingroup$ 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. $\endgroup$– whuber ♦Commented Nov 12, 2014 at 18:57
qnorm
function. $\endgroup$