Learn R Programming

RcmdrMisc (version 2.10.2)

partial.cor: Partial Correlations

Description

Partial Correlations

Usage

partial.cor(X, tests = FALSE, use = c("complete.obs", "pairwise.complete.obs"))

# S3 method for partial.cor print(x, digits = max(3, getOption("digits") - 2), ...)

Value

Returns the matrix of partial correlations, optionally with adjusted and unadjusted p-values.

Arguments

X

data matrix.

tests

show two-sided p-value and p-value adjusted for multiple testing by Holm's method for each partial correlation.

use

observations to use to compute partial correlations, default is "complete.obs".

x

data matrix.

digits

minimal number of _significant_ digits, see print.default.

...

arguments to pass down from the print method.

Author

John Fox

Details

Computes a matrix of partial correlations between each pair of variables controlling for the others.

See Also

Examples

Run this code
data(DavisThin, package="car")
partial.cor(DavisThin)
partial.cor(DavisThin, tests=TRUE)

Run the code above in your browser using DataLab