semidefiniteness           package:micEcon           R Documentation

_T_e_s_t _f_o_r _n_e_g_a_t_i_v_e _a_n_d _p_o_s_i_t_i_v_e _s_e_m_i_d_e_f_i_n_i_t_e_n_e_s_s

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

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

_A_u_t_h_o_r(_s):

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

_R_e_f_e_r_e_n_c_e_s:

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

_E_x_a_m_p_l_e_s:

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

