cor2cov: Correlation Matrix to Covariance Matrix Conversion

cor2covR 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 (University of Notre Dame; KKelley@ND.Edu), Keke Lai


MBESS documentation built on Aug. 8, 2025, 7:24 p.m.