0
$\begingroup$

what is correlation of two vectors of 0?

A: 000000000000000 B: 000000000000000

The R cor function gives NA result, but is the correlation 1 or that it is undefined? However, in my model, 0 output is clearly a legitimate output.

$\endgroup$
1
  • $\begingroup$ What would the correlation between two zero vectors even mean? You say it's a legitimate output, but I don't see how it could be. $\endgroup$ Commented Sep 29, 2021 at 14:06

1 Answer 1

1
$\begingroup$

Your vectors have no variance, so correlation is undefined.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.