Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tauToPearson

Transformation of Tau to Pearson correlation


Description

If the two variables are bivariate normal distributed, this formula maps kendalls tau to bravais pearson correlation coefficient rho.

Usage

tauToPearson(Tau)

Arguments

Tau

Numeric vector in the interval [-1, 1]

Details

This relationship holds only in the case if the two random variables are jointly normal distributed.

Value

Vector of bravais pearson correlation coefficient rho

Author(s)

References

William H. Kruskal, (1958), Ordinal Measures of Association, Journal of the American Statistical Association, Vol. 53, No. 284, pp. 814-861

See Also

Examples

# Plot of relation between kendalls tau and pearson correlation
MaxDisc1 <- nlminb(start=0.5, objective=function (x) -abs(tauToPearson (x)-x))
MaxDisc2 <- nlminb(start=-0.5, objective=function (x) -abs(tauToPearson (x)-x))
plot(x=seq(-1,1,length.out=500), y=tauToPearson(seq(-1,1,length.out=500)), 
xlab=expression(tau), ylab=expression(rho), type="l", las=1, 
main="Relationship between tau and pearson correlation (bivariate normal)", lwd=2)
lines(x=seq(-1,1,length.out=500), y=seq(-1,1,length.out=500), lty=2)
segments(x0=0, y0=-1.25, x1=0, y1=0, lty=2)
segments(x0=-1.25, y0=0, x1=0, y1=0, lty=2)
segments(x0=MaxDisc1$par, y0=-1.25, x1=MaxDisc1$par, y1=tauToPearson (MaxDisc1$par), lty=2)
segments(x0=MaxDisc2$par, y0=-1.25, x1=MaxDisc2$par, y1=tauToPearson (MaxDisc2$par), lty=2)

# The maximum discrepancy between pearson and spearman is at 
# a kendalls tau value about 0.56 and -0.56

discSurv

Discrete Time Survival Analysis

v1.4.1
GPL-3
Authors
Thomas Welchowski <welchow@imbie.meb.uni-bonn.de> and Matthias Schmid <matthias.schmid@imbie.uni-bonn.de>
Initial release
2019-12-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.