cor(x, y=x, pairwise=false)
x
| a matrix. |
y
| a matrix. |
pairwise
| logical. |
cov computes the correlation between the columns
of x and the columns of y.
If pairwise is false (the default),
missing values are handled by casewise deletion.
If pairwise is true, all cases which are
complete for a pair of variables is used to compute the
correlation for that pair of variables.
This can result in correlation matrices which are not
positive semidefinite.