taub: Calculate Kendall's (1938) Tau-B

View source: R/taub.R

taubR Documentation

Calculate Kendall's (1938) Tau-B

Description

taub() takes two vectors and returns Kendall's Tau-b as a measure of rank correlation.

Usage

taub(x1, x2)

Arguments

x1

a vector, and one assumes an integer

x2

a vector, and one assumes an integer

Details

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.

Value

taub() takes two vectors and returns Kendall's Tau-b as a measure of rank correlation.

References

Kendall, Maurice G. 1938. "A New Measure of Rank Correlation". Biometrika 30(1/2): 81-93.

Examples


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')


fpsim documentation built on July 5, 2026, 1:06 a.m.