TITLE(cor @@ Correlation and Covariance Matrices)
USAGE(
cor(x, y=x, use="all.obs")
cov(x, y=x, use="all.obs")
)
ALIAS(cor)
ALIAS(cov)
ARGUMENTS(
ARG(x @@ a matrix or data frame.)
ARG(y @@ a matrix or data frame.)
ARG(use @@ a character string giving the method for handling
missing observations. This must be one of the stringss
LANG("all.obs"), LANG("complete.obs") or LANG("pairwise.complete.obs")
(abbreviations are acceptable).)
)
VALUE(
The correlation matrix or covariance matrix
of the columns of LANG(x) and the columns of LANG(y).
PARA
If LANG(use) has the value LANG("all.obs"), then the presence
of missing observations will cause the computation to fail.
If LANG(use) has the value LANG("complete.obs") then missing values
are handled by casewise deletion.  Finally, if LANG(use) has the
value LANG("pairwise.complete.obs") then the correlation between
each pair of variables is computed using all complete pairs
of observations on those variables.
This can result in correlation matrices which are not
positive semidefinite.
)
