Partial correlation matrix from correlation or covariance matrix | R Documentation |
Partial correlation matrix from correlation or covariance matrix.
cor2pcor(R)
R |
A correlation or covariance matrix. |
Given a correlation or covariance matrix the function will caclulate the pairwise partial correlation conditional on all other variables.
A matrix where each entry is the partial correlation matrix between each pair of variables conditional on all other variables.
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
pcor, cortest, correls
x <- as.matrix(iris[, 1:4])
R <- cor(x)
cor2pcor(R)
pcor(R, 1, 2, 3:4, n = 150)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.