kendallknight: Efficient Implementation of Kendall's Correlation Coefficient Computation

The computational complexity of the implemented algorithm for Kendall's correlation is O(n log(n)), which is faster than the base R implementation with a computational complexity of O(n^2). For small vectors (i.e., less than 100 observations), the time difference is negligible. However, for larger vectors, the speed difference can be substantial and the numerical difference is minimal. The references are Knight (1966) <doi:10.2307/2282833>, Abrevaya (1999) <doi:10.1016/S0165-1765(98)00255-9>, Christensen (2005) <doi:10.1007/BF02736122> and Emara (2024) <https://learningcpp.org/>. This implementation is described in Vargas Sepulveda (2025) <doi:10.1371/journal.pone.0326090>.

Package details

AuthorMauricio Vargas Sepulveda [aut, cre] (ORCID: <https://orcid.org/0000-0003-1017-7574>), Loader Catherine [ctb] (original stirlerr implementations in C (2000)), Ross Ihaka [ctb] (original chebyshev_eval, gammafn and lgammacor implementations in C (1998))
MaintainerMauricio Vargas Sepulveda <m.vargas.sepulveda@gmail.com>
LicenseApache License (>= 2)
Version1.0.0
URL https://pacha.dev/kendallknight/ https://github.com/pachadotdev/kendallknight
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("kendallknight")

Try the kendallknight package in your browser

Any scripts or data that you put into this service are public.

kendallknight documentation built on Aug. 31, 2025, 5:07 p.m.