powered by
taub() takes two vectors and returns Kendall's Tau-b as a measure of rank correlation.
taub()
taub(x1, x2)
a vector, and one assumes an integer
I'll be honest that I wrote this just to say that I did write this and that my workflow would still lean on using the cor() function in base R.
cor()
Kendall, Maurice G. 1938. "A New Measure of Rank Correlation". Biometrika 30(1/2): 81-93.
taub(usamex46$vote1, usamex46$vote2) taub(gmyrus14$gmy, gmyrus14$rus) # Compare with... cor(usamex46$vote1, usamex46$vote2, method = 'kendall') cor(gmyrus14$gmy, gmyrus14$rus, method = 'kendall')
Run the code above in your browser using DataLab