Calculates correlation coefficient between two variables and returns a list containing the
correlation estimate, its standard error, the p-value of a null-hypothesis significance test, and the
number of observations used.
Usage
correlate(x, y, ...)
Value
Returns a list with elements containing the correlation coefficient estimate, its associated
standard error, the p-value of a null-hypothesis significance test, and the number of observations
used, all as numeric vectors of length 1.
Additional arguments to alter the type of null hypothesis significance test, the method used to
calculate the correlation coefficient, the confidence level, or other options should be passed to
correlate() and will be inherited by cor.test(). Note that unlike
cor.test(), both arguments x and y are required.