Biology Reference
In-Depth Information
Score equivalence can be systematically checked by comparing the CPDAGs of
the equivalence classes of dag and dag.eq , which can be derived using the cpdag
function as shown below.
> all.equal(cpdag(dag), cpdag(dag.eq))
[1] TRUE
Similarly, we can derive the moral graphs of dag and dag.eq with moral and
show them to be equal.
> all.equal(moral(dag), moral(dag.eq))
[1] TRUE
Of interest is to note that networks belonging to different equivalence classes may
have the same moral graph but not vice versa. Consider, for instance, the networks
shown in Fig. 2.3 , obtained from dag by dropping, respectively, STAT ANL and
ALG VECT .
> dag2 = drop.arc(dag, from = "STAT", to = "ANL")
> dag3 = drop.arc(dag, from = "ALG", to = "VECT")
dag2 and dag3 cannot belong to the same equivalence class because they contain
different sets of v-structures, as shown below.
> vstructs(dag2)
X Z Y
[1,] "ANL" "ALG" "STAT"
> vstructs(dag3)
X Z Y
[1,] "VECT" "MECH" "ALG"
Equivalently, we can derive their CPDAGs and show them to be different as well.
> all.equal(cpdag(dag2), cpdag(dag3))
[1] "Different number of directed/undirected arcs"
However, dag2 and dag3 have identical moral graphs, and those moral graphs
are identical to the moral graph of dag as well.
> all.equal(moral(dag2), moral(dag3))
[1] TRUE
> all.equal(moral(dag2), moral(dag))
[1] TRUE
> all.equal(moral(dag3), moral(dag))
[1] TRUE
All the examples covered above can be similarly implemented using the other
packages described in Sect. 2.3.1 . However, the lack of a clear separation be-
tween the handling of the network structure and the corresponding local distribu-
tions makes the analysis of the former more cumbersome. For example, both deal
and catnet implement only a single object class (called network in deal and
Search WWH ::




Custom Search