meek: Apply the Meek rules to a causality PDAG

Description Usage Arguments Details Value Note References Examples

View source: R/meek.R

Description

meek will maximally orient the given causality.pdag, possibly turning it into a pattern or dag.

Usage

1
meek(graph)

Arguments

graph

a "causality.pdag"

Details

meek applies the meek rules to the given graph. Applying the rules results in an a maximally oriented pdag. Depending on the exact structure of graph, the output graph is either a dag, pattern, or pdag.

Value

meek either returns a causality.dag, causality.pattern, or causality.pdag.

Note

You are almostly certainly better off using the function as.pattern.

References

Meek C. Causal inference and causal explanation with background knowledge. InProceedings of the Eleventh conference on Uncertainty in artificial intelligence 1995 Aug 18 (pp. 403-410). Morgan Kaufmann Publishers Inc.

Pearl, Judea. Causality. Cambridge university press, 2009.

Examples

1
2
3
4
5
6
7
8
9
# Create a causality.pdag
nodes <- c("X1", "X2", "X3", "X4", "X5")
edges <- matrix(c("X1", "X5", "---",
                  "X1", "X2", "-->",
                  "X3", "X2", "-->",
                  "X3", "X4", "---"), ncol = 3, byrow = T)
graph <- cgraph(nodes, edges)
# Applying the meek rules will turn this graph into a pattern
meek(graph)

tzimiskes/causality documentation built on Sept. 15, 2019, 8:41 p.m.