pdag <- cgraph(A %-->% B, B %---% C, class = "PDAG")
meek_closure(pdag)
#> MPDAG with 3 nodes and 2 edges:
#> nodes: A, B, C
#> edges:
#> A --> B, B --> C

Apply Meek’s orientation rules
Source: R/transform.R, R/jlbind-wrappers.R
Description
Applies Meek’s rules R1-R4 to the PDAG-family graph cg until no further orientation is implied, returning the resulting MPDAG.
Usage
meek_closure(cg, check_cycles = TRUE, r4 = TRUE)Arguments
cg
|
A PDAG-family (PDAG, CPDAG, MPDAG) graph created with cgraph().
|
check_cycles
|
If TRUE (default), check every orientation for a directed cycle it would close, and error if a rule implies one: every DAG consistent with cg would contain it, so cg has no consistent DAG extension and no MPDAG closes it. Disabling this can speed up closure when cg is known to admit no such cycle, but then the result is not checked to be acyclic.
|
r4
|
If TRUE (default), apply rule R4. Disabling this can speed up closure when cg is known not to need it (e.g. it has no background knowledge beyond the v-structures already encoded in it).
|
Details
-
R1:
a --> b --- c,anot adjacent tocimpliesb --> c. -
R2:
a --- b, a directed patha --> w --> bexists impliesa --> b. -
R3:
a --- b, two non-adjacent parentsc, dofbwitha --- canda --- dimpliesa --> b. -
R4:
a --- b,a --- c, andc --> d --> b, withcnot adjacent tobandaadjacent tod, impliesa --> b.
Value
A cgraph of class MPDAG.
References
Meek C (1995). “Causal inference and causal explanation with background knowledge.” In Proceedings of UAI 1995, 403–410.