Ginv               package:haplo.stats               R Documentation

_C_o_m_p_u_t_e _G_e_n_e_r_a_l_i_z_e_d _I_n_v_e_r_s_e _o_f _I_n_p_u_t _M_a_t_r_i_x

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

     Singular value decomposition (svd) is used to compute a
     generalized inverse of input matrix.

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

     Ginv(x)

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

       x: A matrix. 

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

     The svd function uses the LAPACK library standard to compute the 
     singular values of the input matrix, and the rank of the matrix is
      determined by the number of singular values  that  are  at  least
      as large   as  max(svd)*eps,  where  eps  is  a  small  value
     (currently eps = .000001).  For S-PLUS, the Matrix library is
     required.

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

     List with components:

    Ginv: Generalized inverse of x. 

    rank: Rank of matrix x. 

_S_i_d_e _E_f_f_e_c_t_s:

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

     Press  WH,  Teukolsky  SA,  Vetterling  WT,  Flannery  BP.
     Numerical  recipes  in C. The art of scientific computing. 2nd ed.
     Cambridge University Press,  Cambridge.1992.  page 61.

     Anderson, E., et al. (1994). LAPACK User's Guide,  2nd edition,
     SIAM, Philadelphia.

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

     svd

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

     # for matrix x, extract the generalized inverse and 
     # rank of x as follows
     #   > save <- Ginv(x)
     #   > ginv.x <- save$Ginv
     #   > rank.x <- save$rank

