corr.test {stats} R Documentation

Find the correlations, sample sizes, and probability

Description

values between elements of a matrix or data.frame.

Although the cor function finds the correlations for
a matrix, it does not report probability values. cor.test
does, but for only one pair of variables at a time.
corr.test uses cor to find the correlations for either
complete or pairwise data and reports the sample sizes
and probability values as well. For symmetric matrices,
raw probabilites are reported below the diagonal and
correlations adjusted for multiple comparisons above the
diagonal. In the case of different x and ys, the default
is to adjust the probabilities for multiple tests. Both
corr.test and corr.p return raw and adjusted confidence
intervals for each correlation.

Usage

corr.test(x,
    y = NULL,
    use = "pairwise",
    method = "pearson");

Arguments

x

A matrix or dataframe. [as dataframe]

y

A second matrix or dataframe with the same number of rows as x. [as dataframe]

use

use="pairwise" is the default value and will do pairwise deletion of cases. use="complete" will select just complete cases. [as string]

method

method="pearson" is the default value. The alternatives to be passed to cor are "spearman" and "kendall". These last two are much slower, particularly for big data sets. [as string]

Details

Authors

sciBASIC.NET

Value

this function returns data object of type any kind.

clr value class

Examples


[Package stats version 5.0.1.2389 Index]