| Line 14... |
Line 14... |
| 14 |
\concept{Spearman's rho}
|
14 |
\concept{Spearman's rho}
|
| 15 |
\title{Test for Association/Correlation Between Paired Samples}
|
15 |
\title{Test for Association/Correlation Between Paired Samples}
|
| 16 |
\description{
|
16 |
\description{
|
| 17 |
Test for association between paired samples, using one of
|
17 |
Test for association between paired samples, using one of
|
| 18 |
Pearson's product moment correlation coefficient,
|
18 |
Pearson's product moment correlation coefficient,
|
| 19 |
Kendall's \eqn{\tau}{tau} or Spearman's \eqn{\rho}{rho}.
|
19 |
Kendall's \eqn{\tau} or Spearman's \eqn{\rho}.
|
| 20 |
}
|
20 |
}
|
| 21 |
\usage{
|
21 |
\usage{
|
| 22 |
cor.test(x, \dots)
|
22 |
cor.test(x, \dots)
|
| 23 |
|
23 |
|
| 24 |
\method{cor.test}{default}(x, y,
|
24 |
\method{cor.test}{default}(x, y,
|
| Line 37... |
Line 37... |
| 37 |
to positive association, \code{"less"} to negative association.}
|
37 |
to positive association, \code{"less"} to negative association.}
|
| 38 |
\item{method}{a character string indicating which correlation
|
38 |
\item{method}{a character string indicating which correlation
|
| 39 |
coefficient is to be used for the test. One of \code{"pearson"},
|
39 |
coefficient is to be used for the test. One of \code{"pearson"},
|
| 40 |
\code{"kendall"}, or \code{"spearman"}, can be abbreviated.}
|
40 |
\code{"kendall"}, or \code{"spearman"}, can be abbreviated.}
|
| 41 |
\item{exact}{a logical indicating whether an exact p-value should be
|
41 |
\item{exact}{a logical indicating whether an exact p-value should be
|
| 42 |
computed. Used for Kendall's \eqn{\tau}{tau} and
|
42 |
computed. Used for Kendall's \eqn{\tau} and
|
| 43 |
Spearman's \eqn{\rho}{rho}.
|
43 |
Spearman's \eqn{\rho}.
|
| 44 |
See \sQuote{Details} for the meaning of \code{NULL} (the default).}
|
44 |
See \sQuote{Details} for the meaning of \code{NULL} (the default).}
|
| 45 |
\item{conf.level}{confidence level for the returned confidence
|
45 |
\item{conf.level}{confidence level for the returned confidence
|
| 46 |
interval. Currently only used for the Pearson product moment
|
46 |
interval. Currently only used for the Pearson product moment
|
| 47 |
correlation coefficient if there are at least 4 complete pairs of
|
47 |
correlation coefficient if there are at least 4 complete pairs of
|
| 48 |
observations.}
|
48 |
observations.}
|
| 49 |
\item{continuity}{logical: if true, a continuity correction is used
|
49 |
\item{continuity}{logical: if true, a continuity correction is used
|
| 50 |
for Kendall's \eqn{\tau}{tau} and Spearman's \eqn{\rho}{rho} when
|
50 |
for Kendall's \eqn{\tau} and Spearman's \eqn{\rho} when
|
| 51 |
not computed exactly.}
|
51 |
not computed exactly.}
|
| 52 |
\item{formula}{a formula of the form \code{~ u + v}, where each of
|
52 |
\item{formula}{a formula of the form \code{~ u + v}, where each of
|
| 53 |
\code{u} and \code{v} are numeric variables giving the data values
|
53 |
\code{u} and \code{v} are numeric variables giving the data values
|
| 54 |
for one sample. The samples must be of the same length.}
|
54 |
for one sample. The samples must be of the same length.}
|
| 55 |
\item{data}{an optional matrix or data frame (or similar: see
|
55 |
\item{data}{an optional matrix or data frame (or similar: see
|
| Line 97... |
Line 97... |
| 97 |
if the samples follow independent normal distributions. If there are
|
97 |
if the samples follow independent normal distributions. If there are
|
| 98 |
at least 4 complete pairs of observation, an asymptotic confidence
|
98 |
at least 4 complete pairs of observation, an asymptotic confidence
|
| 99 |
interval is given based on Fisher's Z transform.
|
99 |
interval is given based on Fisher's Z transform.
|
| 100 |
|
100 |
|
| 101 |
If \code{method} is \code{"kendall"} or \code{"spearman"}, Kendall's
|
101 |
If \code{method} is \code{"kendall"} or \code{"spearman"}, Kendall's
|
| 102 |
\eqn{\tau}{tau} or Spearman's \eqn{\rho}{rho} statistic is used to
|
102 |
\eqn{\tau} or Spearman's \eqn{\rho} statistic is used to
|
| 103 |
estimate a rank-based measure of association. These tests may be used
|
103 |
estimate a rank-based measure of association. These tests may be used
|
| 104 |
if the data do not necessarily come from a bivariate normal
|
104 |
if the data do not necessarily come from a bivariate normal
|
| 105 |
distribution.
|
105 |
distribution.
|
| 106 |
|
106 |
|
| 107 |
For Kendall's test, by default (if \code{exact} is NULL), an exact
|
107 |
For Kendall's test, by default (if \code{exact} is NULL), an exact
|