Correlation
circ_corrcc(a, b, method='fl', test=False, strict=True)
Angular-Angular / Spherical Correlation.
Three methods are available:
- 'fl' (Fisher & Lee, 1983): T-linear association. The correlation coefficient
- 'js' (Jammalamadaka & SenGupta, 2001)
- 'nonparametric'
, where \(C = 2\pi / n\) and \(\text{rankdiff} = \text{rank}_a - \text{rank}_b\) and \(\text{ranksum} = \text{rank}_a + \text{rank}_b\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
Union[Circular, ndarray, Sequence[float]]
|
Angles in radian |
required |
b
|
Union[Circular, ndarray, Sequence[float]]
|
Angles in radian |
required |
method
|
str
|
|
'fl'
|
test
|
bool
|
Return significant test results. |
False
|
strict
|
bool
|
Strict mode. If True, raise an error when mean direction is not significant. Only for method="js" (Jammalamadaka & SenGupta, 2001). |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
r |
float
|
Correlation coefficient. |
reject |
bool
|
Return significant test if |
Source code in pycircstat2/correlation.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
circ_corrcl(a, x)
Angular-Linear / Cylindrical Correlation based on Mardia (1972).
Also known as Linear-circular or C-linear association (Fisher, 1993).
where \(r_{xc}\), \(r_{xs}\), and \(r_{cs}\) are the correlation coefficients between \(\cos(a)\) and \(x\), \(x\) and \(\sin(a)\), and \(\sin(a)\) and \(\cos(a)\), respectively.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
Union[Circular, ndarray, Sequence[float]]
|
Angles in radian |
required |
x
|
Union[ndarray, Sequence[float]]
|
Linear variable |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ral |
float
|
correlation coefficient. |
pval |
float
|
|
Reference
P658-659, Section 27.15(b) of Example 27.21 (Zar, 2010).
Source code in pycircstat2/correlation.py
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | |