# NOT RUN {
# No ties
x <- c(0.67, 0.45, 0.29, 0.12, 0.57, 0.24, 0.94, 0.75, 0.08, 0.54)
y <- c(0.48, 0.68, 0.32, 0.09, 0.06, 0.61, 0.87, 0.22, 0.44, 0.84)
tauAP(x, y)
tauAP_a(x,y) # same as tauAP
# Ties in y
y <- round(y, 1)
tauAP_a(x, y)
tauAP_b(x, y)
# Ties in x too
x <- round(x, 1)
tauAP_b(x, y)
# Set decreasing to FALSE when x and y already represent ranks
x <- rank(-x)
y <- rank(-y)
tauAP_b(x, y, FALSE) # same as above
# }
Run the code above in your browser using DataLab