Back transform correlation matrix to variance-covariance matrix
Compute a variance-covariance matrix from a correlation matrix and standard deviations.
cor2cov(V, sd = sqrt(diag(V)))
V |
a variance covariance matrix |
sd |
a vector of standard deviations - if ommitted, use the sqrt of the diagonal of V |
a variance-covariance matrix
S4M,
stopifnot(all.equal( cor2cov(cor(mtcars), sapply(mtcars, sd)), cov(mtcars) ))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.