4
$\begingroup$

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?

$\endgroup$
4
  • 3
    $\begingroup$ Why do you think something that converts percentile ranks into something that's nominally a z-score will leave you with an interval scale? $\endgroup$
    – Glen_b
    Commented Jul 18, 2013 at 1:42
  • $\begingroup$ @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? $\endgroup$ Commented Jul 18, 2013 at 2:25
  • 1
    $\begingroup$ Title changed to "convert". I doubt OP was trying for word play here. $\endgroup$
    – Nick Cox
    Commented Jul 18, 2013 at 8:38
  • 1
    $\begingroup$ Use the qnorm function. $\endgroup$
    – mark999
    Commented Jul 18, 2013 at 8:44

2 Answers 2

6
$\begingroup$

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)
$\endgroup$
1
$\begingroup$
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.

$\endgroup$
1
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.