semidefiniteness {micEcon}R Documentation

Test for negative and positive semidefiniteness

Description

Test wether a symmetric matrix is negative semidefinite, positive semidefinite, both of them or none of them.

Usage

semidefiniteness( m, tol = .Machine$double.eps, method = "det" )

Arguments

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).

Author(s)

Arne Henningsen ahenningsen@agric-econ.uni-kiel.de

References

Chiang, A.C. (1984) Fundamental Methods of Mathematical Economics, 3rd ed., McGraw-Hill.

Examples

   # 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 ))

[Package micEcon version 0.1-6 Index]