Skip to main content

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, a not adjacent to c implies b --> c.

  • R2: a --- b, a directed path a --> w --> b exists implies a --> b.

  • R3: a --- b, two non-adjacent parents c, d of b with a --- c and a --- d implies a --> b.

  • R4: a --- b, a --- c, and c --> d --> b, with c not adjacent to b and a adjacent to d, implies a --> 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.

Examples

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