0
$\begingroup$

Scenario 1:

x=c(1,2,3,4)
y=c(2,2,2,2)

Scenario 2:

x=c(3,3,3,3)
y=c(2,2,2,2)

Scenario 3:

x=c(3,3,3,3)
y=c(3,3,3,3)

In R, when I used "cor(method="kendall")":

[1] NA
Warning message:
In cor(x, y, method = "kendall") : the standard deviation is zero

Note: all values are ordinal.

From my point of view, at least for Scenario 3, the "corr coef" should be 1 as the two sets of values perfectly match.

$\endgroup$
2
  • 2
    $\begingroup$ Correlation is a measure of synchronous change, not strict similarity. If one or both vectors have no variance, there can't be a correlation. See this answer. $\endgroup$ Commented Dec 27, 2020 at 5:09
  • $\begingroup$ Yes. I understand that. I think the issue might finally boil down to the limitation of correlation coefficient. $\endgroup$
    – Jason
    Commented Dec 27, 2020 at 5:41

0