Converts a correlation matrix to a partial correlation matrix
Arguments
- R
correlation matrix
Value
Partial correlation matrix
Examples
R <- matrix(.6, nrow = 3, ncol = 3)
diag(R) <- 1
cor2pcor(R)
#> [,1] [,2] [,3]
#> [1,] 1.000 0.375 0.375
#> [2,] 0.375 1.000 0.375
#> [3,] 0.375 0.375 1.000