data(learning.test)
res = pc.stable(learning.test)
## the arc A - B has no direction.
choose.direction(res, learning.test, arc = c("A", "B"), debug = TRUE)
## let's see score equivalence in action.
choose.direction(res, learning.test, criterion = "aic",
arc = c("A", "B"), debug = TRUE)
## arcs which introduce cycles are handled correctly.
res = set.arc(res, "A", "B")
# now A -> B -> E -> A is a cycle.
choose.direction(res, learning.test, arc = c("E", "A"), debug = TRUE)
if (FALSE) {
choose.direction(res, learning.test, arc = c("D", "E"), criterion = "bootstrap",
R = 100, algorithm = "iamb", algorithm.args = list(test = "x2"), cpdag = TRUE,
debug = TRUE)
}
Run the code above in your browser using DataLab