semidefiniteness {micEcon} | R Documentation |
Test wether a symmetric matrix is negative semidefinite, positive semidefinite, both of them or none of them.
semidefiniteness( m, tol = .Machine$double.eps, method = "det" )
m |
a quadratic matrix |
tol |
tolerance level (values between -tol and tol
are considered to be zero). |
method |
method to test for semidefiniteness, either "det" (the textbook method: checking for the signs of the determinants of sub-matrices) or "eigen" (checking for the signs of the eigen values). |
Arne Henningsen ahenningsen@agric-econ.uni-kiel.de
Chiang, A.C. (1984) Fundamental Methods of Mathematical Economics, 3rd ed., McGraw-Hill.
# a positive semidefinite matrix semidefiniteness( matrix( 1, 3, 3 )) # a negative semidefinite matrix semidefiniteness( matrix(-1, 3, 3 )) # a matrix that is positive and negative semidefinite semidefiniteness( matrix( 0, 3, 3 )) # a matrix that is neither positive nor negative semidefinite semidefiniteness( matrix( 1:9, 3, 3 ))