posdef.RdIf 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)An approximate version of mat that is positive definite. Row and column names are retained.