chol2inv-methods           package:Matrix           R Documentation

_I_n_v_e_r_s_e _f_r_o_m _C_h_o_l_e_s_k_i _o_r _Q_R _D_e_c_o_m_p_o_s_i_t_i_o_n - _M_a_t_r_i_x _M_e_t_h_o_d_s

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

     Invert a symmetric, positive definite square matrix from its
     Choleski decomposition.  Equivalently, compute (X'X)^(-1) from the
     (R part) of the QR decomposition of X. 
      Even more generally, given an upper triangular matrix R, compute
     (R'R)^(-1).

_M_e_t_h_o_d_s:


     _x = "_A_N_Y" the default method from 'base', see 'chol2inv', for
          traditional matrices.

     _x = "_d_t_r_M_a_t_r_i_x" method for the numeric triangular matrices, built
          on the same LAPACK 'DPOTRI' function as the base method.

     _x = "_d_e_n_s_e_M_a_t_r_i_x" if 'x' is coercable to a 'triangularMatrix',
          call the '"dtrMatrix"' method above.

     _x = "_s_p_a_r_s_e_M_a_t_r_i_x" if 'x' is coercable to a 'triangularMatrix',
          use 'solve()' currently. 

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

     'chol' (for 'Matrix' objects); further, 'chol2inv' (from the
     'base' package), 'solve'.

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

     (M  <- Matrix(cbind(1, 1:3, c(1,3,7))))
     (cM <- chol(M)) # a "Cholesky" object, inheriting from "dtrMatrix"
     chol2inv(cM) %*% M # the identity
     stopifnot(all(chol2inv(cM) %*% M - Diagonal(nrow(M))) < 1e-10)

