qpPCC                package:qpgraph                R Documentation

_E_s_t_i_m_a_t_i_o_n _o_f _P_e_a_r_s_o_n _c_o_r_r_e_l_a_t_i_o_n _c_o_e_f_f_i_c_i_e_n_t_s

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

     Estimates Pearson correlation coefficients (PCCs) and their
     corresponding P-values between all pairs of variables from an
     input data set.

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

     ## S4 method for signature 'ExpressionSet':
     qpPCC(data, long.dim.are.variables=TRUE)
     ## S4 method for signature 'data.frame':
     qpPCC(data, long.dim.are.variables=TRUE)
     ## S4 method for signature 'matrix':
     qpPCC(data, long.dim.are.variables=TRUE)

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

    data: data set from where to estimate the Pearson correlation
          coefficients. It can be an ExpressionSet object, a data frame
          or a matrix.

long.dim.are.variables: logical; if TRUE it is assumed that when data
          are in a data frame or in a matrix, the longer dimension is
          the one defining the random variables (default); if FALSE,
          then random variables are assumed to be at the columns of the
          data frame or matrix.

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

     The calculations made by this function are the same as the ones
     made for a single pair of variables by the function 'cor.test' but
     for all the pairs of variables in the data set.

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

     A list with two matrices, one with the estimates of the PCCs and
     the other with their P-values.

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

     R. Castelo and A. Roverato

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

     'qpPAC'

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

     nVar <- 50 # number of variables
     maxCon <- 5 # maximum connectivity per variable
     nObs <- 30 # number of observations to simulate

     I <- qpRndGraph(n.vtx=nVar, n.bd=maxCon)
     K <- qpI2K(I)

     X <- qpSampleMvnorm(K, nObs)

     pcc.estimates <- qpPCC(X)

     # Pearson correlation coefficients of the present edges
     summary(abs(pcc.estimates$R[upper.tri(pcc.estimates$R) & I]))

     # Pearson correlation coefficients of the missing edges
     summary(abs(pcc.estimates$R[upper.tri(pcc.estimates$R) & !I]))

