is_positive_definite: Check the positive definiteness of a symmetric real matrix

View source: R/utils.R

is_positive_definiteR Documentation

Check the positive definiteness of a symmetric real matrix

Description

To do so, we compute the eigen values of the corresponding matrix with eigen function, and if all of them are positive above a given threshold, then we return true.

Usage

is_positive_definite(sigma, tol = 1e-06)

Arguments

sigma

a symmetric matrix with real values

tol

the numerical maximal tolerance threshold, to which an eigen value below it is considered negative

Value

a boolean, whether or not the matrix can be considered positive definite or not

Author(s)

Bastien CHASSAGNOL


bastienchassagnol/RGMMBench documentation built on Oct. 26, 2023, 5:58 p.m.