cor2cov: Turn correlation matrix and standard deviations back to...

View source: R/tools.R

cor2covR Documentation

Turn correlation matrix and standard deviations back to covariance matrix

Description

Turn correlation matrix and standard deviations back to covariance matrix

Usage

cor2cov(mycor, mysd = rep(1, dim(mycor)[1]))

Arguments

mycor

correlation matrix

mysd

standard deviations

Value

covariance matrix

Author(s)

Daniel Lill (daniel.lill@physik.uni-freiburg.de)

Examples

mycor <- matrix(c(1,0.8,0.8,1),2)
mysd <- c(sqrt(2),1)
cor2cov(mycor,mysd)

dlill/conveniencefunctions documentation built on Sept. 30, 2022, 4:40 a.m.