cor2cov | R Documentation |
Convert correlation to covariance
cor2cov(V, sd, empirical = FALSE)
cor2cov_ar(V, sd, empirical = FALSE)
V |
A correlation matrix, usually positive semi-definite. |
sd |
A vector of standard deviations. |
empirical |
Logical; TRUE if V is empirical correlation. |
cor2cov
converts a matrix. cor2cov_ar
converts an 3-D array.
A correlation matrix.
V <- matrix(c(1, 0.5, 0.5, 1), ncol = 2)
sd <- 1:2
cor2cov(V, sd)
V_ar <- array(c(1, 0.5, 0.5, 1), dim = c(2, 2, 2))
cor2cov_ar(V_ar, sd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.