The CORR2COV function is part of the IMLMLIB library. The CORR2COV function converts a correlation matrix into a covariance matrix. The first argument, R, is the correlation matrix, and the second argument, sd, is a vector such that sd[j]
is the standard deviation of the th column. An example follows:
R = {1.00 0.25 0.90, 0.25 1.00 0.50, 0.90 0.50 1.00}; sd = {1 4 9}; /* std devs of the vars */ S = Corr2Cov(R, sd); /* convert correlation to covariance */ print S;
The function scales the correlation matrix so that , where is the diagonal matrix of standard deviations.