Computes a circular correlation coefficient as defined in Jammalamadaka & SenGupta (2001).
circ_corr(a, b, ill_defined = FALSE, mu = NULL, na.rm = FALSE)
first variable
second variable
is one of the variables mean is not well-defined (e.g., it is uniformly distributed)?
fix the mean parameter of both vectors to a certain value
a logical value indicating whether NA values should be removed before the computation proceeds
correlation coefficient
Jammalamadaka, S. R., & SenGupta, A. (2001). Topics in Circular Statistics. WORLD SCIENTIFIC. doi:10.1142/4031
requireNamespace("mgcv")
data <- mgcv::rmvn(10000, c(0, 0), V = matrix(c(1, 0.5, 0.5, 1), ncol = 2))
circ_corr(data[, 1], data[, 2])
#> [1] 0.4394698