Learn R Programming

SIN (version 0.6)

sdcor2cov: Covariance matrix

Description

This function takes a vector of standard deviations and a correlation matrix as input and computes the covariance matrix.

Usage

sdcor2cov(stddev, corr)

Arguments

stddev
a vector of standard deviations.
corr
a correlation matrix.

Value

The function returns the covariance matrix corresponding to the input information.

Examples

Run this code
data(sur)
sdcor2cov(sur$stddev, sur$corr)

Run the code above in your browser using DataLab