to_covmatrix | R Documentation |
Given a correlation matrix and correct number of standard deviations, tocovmatrix() converts the correlation matrix to a covariance matrix. If you only have a vector correlation, you can convert it to a correlation matrix first, using the function to_cormatrix().
to_covmatrix(cor_matrix, sd_vec)
cor_matrix |
A a symmetric correlation matrix. |
sd_vec |
A vector of the variables' standard deviations. |
mycormat <- to_cormatrix(cor_vec = c(0.3, 0.5, 0.6), n_dim=3) to_covmatrix(mycormat, sd_vec = c(0.95, 0.98, 1.1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.