\Header{corr}{Correlation Coefficient}
\keyword{math}{corr}
\keyword{multivariate}{corr}
\begin{Description}\relax
Calculates the weighted correlation given a data set and a set of weights.
\end{Description}
\begin{Usage}
\begin{verbatim}
corr(d, w=rep(1,nrow(d))/nrow(d))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{d}] A matrix with two columns corresponding to the two variables whose correlation
we wish to calculate.

\item[\code{w}] A vector of weights to be applied to each pair of observations.  The default
is equal weights for each pair.  Normalization takes place within the function
so \code{sum(w)} need not equal 1.

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function finds the correlation coefficient in weighted form.  This is
often useful in bootstrap methods since it allows for numerical differentiation
to get the empirical influence values.  It is also necessary to have the 
statistic in this form to find ABC intervals.
\end{Details}
\begin{Value}
The correlation coefficient between \code{d[,1]} and \code{d[,2]}.
\end{Value}
\begin{SeeAlso}\relax
\code{\Link{cor}}
\end{SeeAlso}

