Search code examples
rspss

Could someone point me to the normal score transform and its use in R?


I'd like to transform a variable (which is not normal at all) using the equivalent command Rank Cases...-->Normal Scores employed by SPSS. I want to do this using R. I've found out that SPSS uses Blom's Formula to carry this out.

Could you help me or give any suggestions?

Thanks in advance.

Best Regards!


Solution

  • I don't know what Blom's formula is, but the powerTransform function in the car package might do what you want. The function uses Box-Cox transformations

    x <- exp(qnorm(runif(100)))
    require(car)
    powerTransform(x)
    #Estimated transformation parameters 
    #          x 
    #-0.02340301 
    xT <- x^(-0.02340301)
    

    Plotting the densities of the untransformed and transformed variables shows the effect of the transformation. enter image description here