Learn R Programming

fpsim (version 0.1.0)

taub: 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)

Value

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

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.

References

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

Examples

Run this code

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