This function computes the empirical Kendall's tau using the algorithm by Knight (1966).

TauMatrix(data, weights = NA)

Arguments

data

An N x d data matrix.

weights

Numerical; weights for each observation (optional).

Value

Matrix of the empirical Kendall's taus.

References

Knight, W. R. (1966). A computer method for calculating Kendall's tau with ungrouped data. Journal of the American Statistical Association 61 (314), 436-439.

Author

Ulf Schepsmeier

Examples


data(daxreturns)
Data <- as.matrix(daxreturns)

# compute the empirical Kendall's taus
TauMatrix(Data)
#>            ALV.DE    BAS.DE   BAYN.DE    BMW.DE    DAI.DE    DBK.DE    DTE.DE
#> ALV.DE  1.0000000 0.4035405 0.3196926 0.3955334 0.4311326 0.5171271 0.3232662
#> BAS.DE  0.4035405 1.0000000 0.4229105 0.3543125 0.3814985 0.4110252 0.2790956
#> BAYN.DE 0.3196926 0.4229105 1.0000000 0.2902465 0.2994419 0.3246933 0.2671566
#> BMW.DE  0.3955334 0.3543125 0.2902465 1.0000000 0.4906725 0.4107386 0.2709094
#> DAI.DE  0.4311326 0.3814985 0.2994419 0.4906725 1.0000000 0.4450361 0.2910675
#> DBK.DE  0.5171271 0.4110252 0.3246933 0.4107386 0.4450361 1.0000000 0.3407284
#> DTE.DE  0.3232662 0.2790956 0.2671566 0.2709094 0.2910675 0.3407284 1.0000000
#> EOAN.DE 0.3025647 0.3719509 0.3160055 0.2362178 0.2834246 0.3252217 0.3117272
#> FME.DE  0.1860583 0.1928145 0.2004245 0.1999678 0.1745492 0.1721727 0.2303781
#> LIN.DE  0.3581041 0.4017671 0.3481504 0.3070430 0.3248008 0.3303896 0.2449444
#> MUV2.DE 0.5266479 0.3610866 0.3066937 0.3267354 0.3859977 0.4269349 0.3076819
#> RWE.DE  0.2971520 0.3518375 0.2984775 0.2322918 0.2797136 0.3169310 0.2997524
#> SAP.DE  0.3714314 0.3324735 0.2750712 0.2930111 0.3302941 0.3678518 0.2795166
#> SIE.DE  0.4419102 0.4329448 0.3380206 0.3798625 0.4274216 0.4526013 0.3135126
#> VOW3.DE 0.2839530 0.2408752 0.1874495 0.3200448 0.3637407 0.2857951 0.1857149
#>           EOAN.DE    FME.DE    LIN.DE   MUV2.DE    RWE.DE    SAP.DE    SIE.DE
#> ALV.DE  0.3025647 0.1860583 0.3581041 0.5266479 0.2971520 0.3714314 0.4419102
#> BAS.DE  0.3719509 0.1928145 0.4017671 0.3610866 0.3518375 0.3324735 0.4329448
#> BAYN.DE 0.3160055 0.2004245 0.3481504 0.3066937 0.2984775 0.2750712 0.3380206
#> BMW.DE  0.2362178 0.1999678 0.3070430 0.3267354 0.2322918 0.2930111 0.3798625
#> DAI.DE  0.2834246 0.1745492 0.3248008 0.3859977 0.2797136 0.3302941 0.4274216
#> DBK.DE  0.3252217 0.1721727 0.3303896 0.4269349 0.3169310 0.3678518 0.4526013
#> DTE.DE  0.3117272 0.2303781 0.2449444 0.3076819 0.2997524 0.2795166 0.3135126
#> EOAN.DE 1.0000000 0.1908560 0.2744114 0.2833559 0.5555983 0.2520260 0.3245768
#> FME.DE  0.1908560 1.0000000 0.1696738 0.1745880 0.1860822 0.1530625 0.1912202
#> LIN.DE  0.2744114 0.1696738 1.0000000 0.3082700 0.2644428 0.2720140 0.3673442
#> MUV2.DE 0.2833559 0.1745880 0.3082700 1.0000000 0.2816273 0.3039350 0.3764918
#> RWE.DE  0.5555983 0.1860822 0.2644428 0.2816273 1.0000000 0.2607766 0.3131334
#> SAP.DE  0.2520260 0.1530625 0.2720140 0.3039350 0.2607766 1.0000000 0.3671950
#> SIE.DE  0.3245768 0.1912202 0.3673442 0.3764918 0.3131334 0.3671950 1.0000000
#> VOW3.DE 0.1687214 0.1145345 0.2256043 0.2505154 0.1699186 0.2316649 0.2699301
#>           VOW3.DE
#> ALV.DE  0.2839530
#> BAS.DE  0.2408752
#> BAYN.DE 0.1874495
#> BMW.DE  0.3200448
#> DAI.DE  0.3637407
#> DBK.DE  0.2857951
#> DTE.DE  0.1857149
#> EOAN.DE 0.1687214
#> FME.DE  0.1145345
#> LIN.DE  0.2256043
#> MUV2.DE 0.2505154
#> RWE.DE  0.1699186
#> SAP.DE  0.2316649
#> SIE.DE  0.2699301
#> VOW3.DE 1.0000000