Returns TRUE if and only if a matrix is positive definite.
TRUE
is.positive.definite(a, ...)
Matrix to be tested
Extra arguments passed to eigen(), such as symmetric.
eigen()
symmetric
A wrapper for eigen() (a matrix is positive definite if all its eigenvalues are positive). This function is included for convenience only.
# NOT RUN { is.positive.definite(diag(3),sym=TRUE) is.positive.definite(diag(6)-0.1) # }
Run the code above in your browser using DataCamp Workspace