qpI2K                package:qpgraph                R Documentation

_R_a_n_d_o_m _c_o_n_c_e_n_t_r_a_t_i_o_n _m_a_t_r_i_x

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

     Builds a random concentration matrix containing zeroes on those
     entries associated to pairs of variables that are disconnected on
     a given undirected graph.

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

     qpI2K(I, verbose=FALSE, R.code.only=FALSE)

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

       I: incidence matrix of an undirected graph.

 verbose: show progress on the calculations.

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 random concentration matrix is built by first generating a
     matrix of random correlations using the method from Marsaglia and
     Oltkin (1984). Second, this matrix is inverted to obtain an
     initial random covariance matrix. Third, this covariance matrix is
     adjusted to the independence constraints of the input undirected
     graph by using the function 'qpIPF' and finally is inverted to
     obtain the final random concentration matrix.

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

     A random concentration matrix with zeroes at the empty adjacencies
     of the undirected graph defined by the input incidence matrix.

_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:

     'qpSampleMvnorm' 'qpK2R'

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

     nVar <- 50 # number of variables
     maxCon <- 5  # maximum connectivity per variable

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

     realI <- K != 0
     diag(realI) <- FALSE

     sum(realI) / 2

     sum(I) / 2

     # all present edges (dependencies) in realI must be in I
     identical(I & realI, realI)

     # all missing edges (independencies) in I must be in realI
     identical(!I & !realI, !I)

