is_posdef: Matrix Positive-Definiteness Check

View source: R/cov_help_funcs.R

is_posdefR Documentation

Matrix Positive-Definiteness Check

Description

Performs a tolerance check for positive-definiteness of a symmetric matrix.

Usage

is_posdef(mat, tol = 1e-08)

Arguments

mat

a pxp matrix.

tol

a double with tolerance for the eigenvalues. Default value is 1e-8.

Value

a logical. TRUE, if the matrix mat is positive-definite.

Examples

data(rets_m)
ml_sigma <- cov_estim_wrapper2(rets_m, "ML")
is_posdef(ml_sigma)

ml_sigma <- cov_estim_wrapper2(rets_m[1:100, ], "ML")
is_posdef(ml_sigma)


antshi/CovEstim documentation built on June 10, 2025, 3:11 a.m.