edgeMatrix                package:ggm                R Documentation

_E_d_g_e _m_a_t_r_i_x _o_f _a _g_r_a_p_h

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

     Transforms the adjacency matrix of a graph into an ``edge
     matrix''.

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

     edgeMatrix(E, inv=FALSE)

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

       E: a square matrix, representing the adjacency matrix of a
          graph.

     inv: a logical value.

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

     In some matrix computations for graph objects the adjacency matrix
     of the graph is transformed into an ``edge matrix''. Briefly, if E
     is the adjacency matrix of the graph, the edge matrix is A =
     sign(E+I)^T=[a_{ij}].  Thus, A has ones along the diagonal and if
     the graph has no edge beteween nodes i and j the entries a_{i,j}
     and a_{j,i} are both zero.   If there is an arrow from j to i 
     a_{i,j}=1 and  a_{j,i} = 0. If there is an undirected edge, both
     a_{i,j}=a_{j,i}=1.

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

       A: the edge matrix of the graph. If 'TRUE' the nodes are sorted
          in inverted topological order and the edge matrix is upper
          triangular.

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

     Giovanni M. Marchetti

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

     Wermuth, N. (2003). Analysing social science data with graphical
     Markov models. In: _Highly Structured Stochastic Systems._ P.
     Green, N. Hjort & T. Richardson (eds.), 47-52. Oxford: Oxford
     University Press.

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

     'adjMatrix'

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

     amat <- DAG(y ~ x+z, z~u+v)
     amat
     edgeMatrix(amat)
     edgeMatrix(amat, inv=TRUE)

