Rev 2 | Blame | Last modification | View Log | Download | RSS feed
\name{cor}\title{Correlation and Covariance Matrices}\usage{cor(x, y=x, use="all.obs")cov(x, y=x, use="all.obs")}\alias{cor}\alias{cov}\arguments{\item{x}{a matrix or data frame.}\item{y}{a matrix or data frame.}\item{use}{a character string giving the method for handlingmissing observations. This must be one of the stringss\code{"all.obs"}, \code{"complete.obs"} or \code{"pairwise.complete.obs"}(abbreviations are acceptable).}}\value{The correlation matrix or covariance matrixof the columns of \code{x} and the columns of \code{y}.If \code{use} has the value \code{"all.obs"}, then the presenceof missing observations will cause the computation to fail.If \code{use} has the value \code{"complete.obs"} then missing valuesare handled by casewise deletion. Finally, if \code{use} has thevalue \code{"pairwise.complete.obs"} then the correlation betweeneach pair of variables is computed using all complete pairsof observations on those variables.This can result in correlation matrices which are notpositive semidefinite.}\keyword{multivariate}\keyword{array}