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?
Asked
Active
Viewed 1.2k times
4
-
3Why do you think something that converts percentile ranks into something that's nominally a z-score will leave you with an interval scale? – Glen_b Jul 18 '13 at 01: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? – doug.numbers Jul 18 '13 at 02:25
-
1Title changed to "convert". I doubt OP was trying for word play here. – Nick Cox Jul 18 '13 at 08:38
-
1Use the `qnorm` function. – mark999 Jul 18 '13 at 08:44
2 Answers
4
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)

Glen_b
- 257,508
- 32
- 553
- 939
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.
-
4This 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 Nov 12 '14 at 18:57