wils.hilf_function(x, v) { # input ############################################################ ## x: vector of mahalanonbis residual ## v: vector of degree of freedom #################################################################### # output ########################################################### ## y: Wilson-Hilferty (W-H) transformed mahalanonbis residuals #################################################################### #***************** Main **************************# # computing normalized mahalanonbis residual y <- ((x/v)^(1/3) - 1 + 2/9/v) * ((9 * v)/2)^(1/2) # # #***************************************************# y }