qpEdgeNrr              package:qpgraph              R Documentation

_N_o_n-_r_e_j_e_c_t_i_o_n _r_a_t_e _e_s_t_i_m_a_t_i_o_n _f_o_r _a _p_a_i_r _o_f _v_a_r_i_a_b_l_e_s

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

     Estimates non-rejection rate for one pair of variables.

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

     ## S4 method for signature 'ExpressionSet':
     qpEdgeNrr(data, N, i=1, j=2, q=1, nTests=100,
                                         alpha=0.05, long.dim.are.variables=TRUE,
                                         R.code.only=FALSE)
     ## S4 method for signature 'data.frame':
     qpEdgeNrr(data, N, i=1, j=2, q=1, nTests=100,
                                      alpha=0.05, long.dim.are.variables=TRUE,
                                      R.code.only=FALSE)
     ## S4 method for signature 'matrix':
     qpEdgeNrr(data, N, i=1, j=2, q=1, nTests=100,
                                  alpha=0.05, long.dim.are.variables=TRUE,
                                  R.code.only=FALSE)

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

    data: data set from where the non-rejection rate should be
          estimated. It can be either an 'ExpressionSet' object, a data
          frame, or a matrix. If it is a matrix and the matrix is
          squared then this function assumes the matrix is the sample
          covariance matrix of the data and the sample size parameter
          'N' should be provided.

       N: number of observations in the data set. Only necessary when
          the sample covariance matrix is provided through the 'data'
          parameter.

       i: index or name of one of the two variables.

       j: index or name of the other variable.

       q: partial-correlation order.

  nTests: number of tests to perform for each pair for variables.

   alpha: significance level of each test.

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.

R.code.only: logical; if FALSE then the faster C implementation is used
          (default); if TRUE then only R code is executed.

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

     The estimation of the non-rejection rate for a pair of variables
     is calculated as the fraction of tests that accept the null
     hypothesis of independence given a set of randomly sampled q-order
     conditionals.

     Note that the possible values of 'q' should be in the range 1 to
     'min(p,n-3)', where 'p' is the number of variables and 'n' the
     number of observations. The computational cost increases linearly
     with 'q'.

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

     An estimate of the non-rejection rate for the particular given
     pair of variables.

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

     R. Castelo and A. Roverato

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

     Castelo, R. and Roverato, A. A robust procedure for Gaussian
     graphical model search from microarray data with p larger than n,
     _J. Mach. Learn. Res._, 7:2621-2650, 2006.

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

     'qpNrr' 'qpAvgNrr' 'qpHist' 'qpGraphDensity' 'qpClique'

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

     # in this graph 3 is conditional independent of 4 given 1 AND 2

     I <- matrix(c(FALSE,  TRUE,  TRUE,  TRUE,
                   TRUE,  FALSE,  TRUE,  TRUE,
                   TRUE,   TRUE, FALSE, FALSE,
                   TRUE,   TRUE, FALSE, FALSE), nrow=4, ncol=4, byrow=TRUE)
     K <- qpI2K(I)

     X <- qpSampleMvnorm(K, N=100)

     qpEdgeNrr(X, i=3, j=4, q=1, long.dim.are.variables=FALSE)

     qpEdgeNrr(X, i=3, j=4, q=2, long.dim.are.variables=FALSE)

