Last chance! 50% off unlimited learning
Sale ends in
pc.skel
or pc.con
and performes the 4 orientation rules. A graph is also possible to visualize.
pc.or(mod, graph = FALSE)
pc.skel
or pc.con
.
The first rule is applied once. Rules 2-4 are applied repeatedly until no more edges can be oriented.
Zhang, Jiji. (2008). On the completeness of orientation rules for causal discovery in the presence of latent confounders and selection bias. Artificial Intelligence 172(16): 1873--1896.
pc.con, pc.skel, mmhc.skel, mb
# simulate a dataset with continuous data
y = rdag(1000, 15, 0.3)
tru = y$G
x = y$x
mod = pc.con(x)
mod$runtime
b = pc.or(mod)
plota(tru)
dev.new()
plota(b$G)
dev.off()
plota( dag2eg(tru) ) ## essential graph
dev.new()
plota(b$G)
Run the code above in your browser using DataLab