circ_lin_corr.Rd
Implementation of the circular-linear correlation measure introduced by Mardia (1976) and Johnson and Wehrly (1977) as cited in Jammalamadaka & Sengupta (2001).
circ_lin_corr(circ_x, lin_x, na.rm = F)
circular variable
linear variable
a logical value indicating whether NA values should be removed before the computation proceeds
circular-linear correlation measure
This measure is computed as \[r^2 = (r_{xc}^2+r_{xs}^2-2 r_{xc} r_{xs}r_{cs})/(1-r_{cs}^2)\] where \(r_{xc} = corr(x, cos(\alpha))\), \(r_{xs} = corr(x, sin(\alpha))\), \(r_{cs} = corr(cos(\alpha), sin(\alpha))\), and \(\alpha\) and \(x\) are the circular and linear variables, respectively.
Jammalamadaka, S. R., & SenGupta, A. (2001). Topics in Circular Statistics. WORLD SCIENTIFIC. https://doi.org/10.1142/4031
x <- rnorm(50)
a <- as.vector(circular::rvonmises(50, 0, 5))
#> Warning: an object is coerced to the class 'circular' using default value for the following components:
#> type: 'angles'
#> units: 'radians'
#> template: 'none'
#> modulo: 'asis'
#> zero: 0
#> rotation: 'counter'
#> conversion.circularmuradians0counter
circ_lin_corr(x+a, x)
#> [1] 0.814133