triDec                  package:ggm                  R Documentation

_T_r_i_a_n_g_u_l_a_r _d_e_c_o_m_p_o_s_i_t_i_o_n _o_f _a _c_o_v_a_r_i_a_n_c_e _m_a_t_r_i_x

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

     Decomposes a symmetric positive definite matrix with a variant of
     the Cholesky decomposition.

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

     triDec(Sigma)

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

   Sigma: a symmetric positive definite matrix.

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

     Any symmetric positive definite matrix Sigma can be decomposed as
     Sigma = B %*% Delta %*% t(B) where B is upper triangular with ones
     along the main diagonal and Delta is diagonal. If Sigma is a
     covariance matrix, the concentration matrix is Sigma^{-1} = A^T
     Delta^{-1} A where  A = B^{-1} is the matrix of the regression
     coefficients (with the sign changed) of a system of linear
     recursive regression equations  with independent residuals. In the
     equations each variable  i is regressed on the variables i+1, ...,
     d. The elements on the diagonal of Delta are the partial
     variances.

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

       A: a square upper triangular matrix of the same order as 'Sigma'
          with ones on the diagonal.

       B: the inverse of 'A', another triangular matrix with unit
          diagonal.

   Delta: a vector containing the diagonal values of Delta.

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

     Giovanni M. Marchetti

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

     Cox, D. R. & Wermuth, N. (1996). _Multivariate dependencies_.
     London: Chapman & Hall.

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

     'chol'

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

     ## Triangular decomposition of a covariance matrix
     B <- matrix(c(1,  -2, 0, 1,
                   0,   1, 0, 1,
                   0,   0, 1, 0,
                   0,   0, 0, 1), 4, 4, byrow=TRUE)
     B
     D <- diag(c(3, 1, 2, 1))
     S <- B %*% D %*% t(B)
     triDec(S)
     solve(B)

