pcor                   package:ggm                   R Documentation

_P_a_r_t_i_a_l _c_o_r_r_e_l_a_t_i_o_n

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

     Computes the partial correlation between two variables given a set
     of other variables.

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

     pcor(u, S)

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

       u: a vector of integers of length > 1. The first two integers
          are the indices of variables the correlation of which must be
          computed. The rest of the vector is the conditioning set. 

       S: a symmetric positive definite matrix, a sample covariance
          matrix.

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

     a scalar, the partial correlation matrix between variables 'u[1]'
     and 'u[2]' given 'u[-c(1,2)]'.

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

     Giovanni M. Marchetti

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

     'cor',  'parcor', 'correlations'

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

     data(marks)
     ## The correlation between vectors and algebra given analysis and statistics
      pcor(c("vectors", "algebra", "analysis", "statistics"), var(marks))
     ## The same
     pcor(c(2,3,4,5), var(marks))
     ## The correlation between vectors and algebra given statistics
      pcor(c("vectors", "algebra", "statistics"), var(marks))
     ## The marginal correlation between analysis and statistics 
     pcor(c("analysis","statistics"), var(marks))

