dSep                   package:ggm                   R Documentation

_d-_s_e_p_a_r_a_t_i_o_n

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

     Determines if in a directed acyclic graph two set of nodes a
     d-separated by a third set of nodes.

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

     dSep(amat, first, second, cond)

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

    amat: a Boolean matrix with dimnames, representing the adjacency
          matrix of a directed acyclic graph. The function does not
          check if this is the case. See the function 'isAcyclic'. 

   first: a vector representing  a subset of nodes of the DAG. The
          vector should be a character vector of the names of the
          variables matching the names of the nodes in 'rownames(A)'.
          It can be also a numeric vector of indices. 

  second: a vector representing  another subset of nodes of the DAG.
          The set 'second' must be disjoint from 'first'. The mode of
          'second' must match the mode of 'first'.

    cond: a vector representing a conditioning subset of nodes. The set
          'cond' must be disjoint from the other two sets and must
          share the same mode. 

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

     d-separation is a fundamental concept introduced by Pearl (1988).

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

     a logical value. 'TRUE' if 'first' and 'second' are d-separated by
     'cond'.

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

     Giovanni M. Marchetti

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

     Pearl, J. (1988). _Probabilistic reasoning in intelligent
     systems._ San Mateo: Morgan Kaufmann.

     Lauritzen, S. (1996). _Graphical models_. Oxford: Clarendon Press.

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

     'DAG', 'shipley.test', 'inducedCovGraph'

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

     ## Conditioning on a transition node
     dSep(DAG(y ~ x, x ~ z), first="y", second="z", cond = "x")
     ## Conditioning on a collision node (collider)
     dSep(DAG(y ~ x, y ~ z), first="x", second="z", cond = "y")
     ## Conditioning on a source node
     dSep(DAG(y ~ x, z ~ x), first="y", second="z", cond = "x")
     ## Marginal independence
     dSep(DAG(y ~ x, y ~ z), first="x", second="z", cond = NULL)
     ## The DAG defined on p.~47 of Lauritzen (1996)
     dag <- DAG(g ~ x, h ~ x+f, f ~ b, x ~ l+d, d ~ c, c ~ a, l ~ y, y ~ b)
     dSep(dag, first="a", second="b", cond=c("x", "y"))
     dSep(dag, first="a", second=c("b", "d"), cond=c("x", "y"))

