cor2cov | R Documentation |
Function to convert a correlation matrix to a covariance matrix.
cor2cov(cor.mat, sd)
cor.mat |
the correlation matrix to be converted |
sd |
a vector that contains the standard deviations of the variables in the correlation matrix |
The correlation matrix to convert can be either symmetric or triangular. The covariance matrix returned is always a symmetric matrix.
The correlation matrix input should be a square matrix, and the length of sd
should be equal to
the number of variables in the correlation matrix (i.e., the number of rows/columns).
Ken Kelley (University of Notre Dame; KKelley@ND.Edu), Keke Lai
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.