det                   package:spam                   R Documentation

_C_a_l_c_u_l_a_t_e _t_h_e _d_e_t_e_r_m_i_n_a_n_t _o_f _a _p_o_s_i_t_i_v_e _d_e_f_i_n_i_t_e _S_p_a_r_s_e _M_a_t_r_i_x

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

     'det' and 'determinant' calculate the determinant of a positive
     definite sparse matrix. 'determinant' returns separately the
     modulus of the determinant, optionally on the logarithm scale, and
     the sign of the determinant.

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

     #     det(x, ...)
     determinant(x, logarithm = TRUE, ...)

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

       x: sparse matrix of class 'spam' or a Cholesky factor  of class
          'spam.chol.NgPeyton'.

logarithm: logical; if 'TRUE' (default) return the logarithm of the
          modulus of the determinant.

     ...: Optional arguments. Examples include 'method' argument and
          additional parameters used by the method.

_D_e_t_a_i_l_s:

     If the matrix is not positive definite, the function issues a
     warning and returns 'NA'.

     The determinant is based on the product of the diagonal entries of
     a Cholesky factor, i.e. internally, a Cholesky decomposition is
     performed. By default, the NgPeyton algorithm with minimal degree
     ordering us used. To change the methods or supply additonal
     parameters to the Cholesky factorization function, see the help
     for 'chol'.

     The determinant of a Cholesky factor is also defined.

_V_a_l_u_e:

     For 'det', the determinant of 'x'.  For 'determinant', a list with
     components

 modulus: a numeric value.  The modulus (absolute value) of the
          determinant if 'logarithm' is 'FALSE'; otherwise the
          logarithm of the modulus.

    sign: integer; either +1 or -1 according to whether the determinant
          is positive or negative.

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

     Reinhard Furrer

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

     Ng, E. G. and B. W. Peyton (1993) Block sparse Cholesky algorithms
     on advanced uniprocessor computers, _SIAM J. Sci. Comput._, *14*,
     1034-1056.

_S_e_e _A_l_s_o:

     'chol'

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

     x <- spam( c(4,3,0,3,5,1,0,1,4),3)
     det( x)
     determinant( x)

     det( chol( x))

