Code computing (Generalized) Kendall's tau and its jackknife variance under serial dependence. It is tied to the paper:
Perreault, S. (2024) Simultaneous computation of Kendall’s tau and its jackknife variance. Statistics & Probability Letters, 213, 110181. doi.org/10.1016/j.spl.2024.110181
The folder src/ contains the C++ implementations of the algorithms and the functions.R file contains wrappers. It should be clear in the R file which C++ functions are used.
library(Rcpp)
sourceCpp("src/ms.cpp") # for Knight's extended alg.
sourceCpp("src/dac_seq.cpp") # divide-and-conquer alg.
sourceCpp("src/bf.cpp") # brute force alg.
source("functions.R") # wrappers
n <- 1e4
d <- 4
X <- matrix(rnorm(n*d), n, d)
taujack_ms(X, flatten = F)
taujack_dac(X, thresh=10L)
taujack_bf(X, seq = T)