Partial correlation matrix from correlation or covariance matrix {pchc}R Documentation

Partial correlation matrix from correlation or covariance matrix

Description

Partial correlation matrix from correlation or covariance matrix.

Usage

cor2pcor(R)

Arguments

R

A correlation or covariance matrix.

Details

Given a correlation or covariance matrix the function will caclulate the pairwise partial correlation conditional on all other variables.

Value

A matrix where each entry is the partial correlation matrix between each pair of variables conditional on all other variables.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

See Also

pcor, cortest, correls

Examples

x <- as.matrix(iris[, 1:4])
R <- cor(x)
cor2pcor(R)
pcor(R, 1, 2, 3:4, n = 150)

[Package pchc version 1.2 Index]