Learn R Programming

BinNor (version 2.3.4)

lower.tri.to.corr.mat: Converts a vector of correlations to a full correlation matrix

Description

This function creates full correlation matrix from the vector containing elements below the diagonal.

Usage

lower.tri.to.corr.mat(corr.vec = NULL, d)

Value

corr.mat

Full correlation matrix

Arguments

corr.vec

A vector of elements below diagonal of correlation matrix. The elements must be ordered starting from first element below diagonal of the first column, then second element below diagonal of the first column and so on.

d

Number of column in final correlation matrix.

See Also

Examples

Run this code
corr.vec=c(0.16,0.04,0.38,0.14,0.47,0.68)
lower.tri.to.corr.mat(corr.vec,4)

Run the code above in your browser using DataLab