cor2cov {MBESS}R Documentation

Correlation Matrix to Covariance Matrix Conversion

Description

Function to convert a correlation matrix to a covariance matrix.

Usage

cor2cov(cor.mat, sd)

Arguments

cor.mat the correlation matrix to be converted
sd a vector that contains the standard deviations of the variables in the correlation matrix

Details

The correlation matrix to convert can be either symmetric or triangular. The covariance matrix returned is always a symmetric matrix.

Note

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).

Author(s)

Ken Kelley (Indiana University; KKIII@Indiana.Edu), Keke Lai


[Package MBESS version 0.0.9 Index]