cor2cov: Convert a correlaiton matrix into a covariance matrix

Description Usage Arguments Details

View source: R/util.R

Description

Given a correlation matrix an a vector of standard deviations for the individual variables, produce a covariance matrix.

Usage

1
cor2cov(cormat, scales)

Arguments

cormat

Correlation matrix

scales

Vector of scale factors (i.e., standard deviations)

Details

This is a convenience function, meant for producing covariance matrices for proposal distributions in cases where you have an idea of what the correlation should be, and you want to specify the scale independently. No checks are performed to see, for example, whether the correlation matrix is valid.


JGCRI/metrosamp documentation built on Aug. 8, 2019, 10:59 p.m.