If the output matrix from getrhomatrix is not positive definite, this will find an approximate matrix that is using Matrix::nearPD() with corr=TRUE.

posdef(mat)

Arguments

mat

A symmetrical square matrix with 1's on diagonal.

Value

An approximate version of mat that is positive definite. Row and column names are retained.

See also