pc.cons.intern()
function is used in pc
and
fci
, notably when
conservative = TRUE
(conservative orientation of v-structures) or
maj.rule = TRUE
(majority rule orientation of v-structures).
pc.cons.intern(sk, suffStat, indepTest, alpha, version.unf = c(NA, NA), maj.rule = FALSE, verbose = FALSE)
skeleton()
.indepTest
.indepTest(x,y,S,suffStat)
, and
tests conditional independence of x
and y
given
S
. Here, x
and y
are variables, and S
is
a (possibly empty) vector of variables (all variables are denoted
by their column numbers
in the adjacency matrix). suffStat
is a list containing
all relevant elements for the conditional independence
decisions. The return value of indepTest
is the p-value of
the test for conditional independence.version.unf
[2]==1,
the intitial separating set found by the PC/FCI algorithm is
added to the set of separating sets; if version.unf[2]==
2, it
is not added. In the latter case, if the set of separating sets is
empty, the triple is marked as unambiguous if
version.unf
[1]==1, and as ambiguous if
version.unf
[1]==2. If version.unf
[2]==1, the initial separating set found in the
PC/FCI algorithm is added to this set of separating sets.
If version.unf
[2]==2, the initial separating set is not added (as in Tetrad).
In the latter case, if the set of separating sets is empty, then the
triple is marked as ambiguous if version.unf
[1]==2, for
example in pc
, or as unambiguous if
version.unf
[1]==1, for example in fci
.
Otherwise, there is at least one separating set.
If maj.rule=FALSE
, the conservative PC algorithm is used
(Ramsey et al., 2006): If B is in some but not all separating sets,
the triple is marked as ambiguous. Otherwise it is treated as in the
standard PC algorithm. If maj.rule=TRUE
, the majority rule is
applied (Colombo and Maathuis, 2014): The triple is marked as
ambiguous if B is in exactly 50 percent of the separating sets. If
it is in less than 50 percent it is marked as a v-structure, and if it
is in more than 50 percent it is marked as a non v-structure.
Note: This function modifies the separating sets for unambiguous triples in the skeleton object (adding or removing B) to ensure that the usual orientations rules later on lead to the correct v-structures/non v-structures.
J. Ramsey, J. Zhang and P. Spirtes (2006). Adjacency-faithfulness and conservative causal inference. In Proceedings of the 22nd Annual Conference on Uncertainty in Artificial Intelligence, Arlington, VA. AUAI Press.
skeleton
, pc
, fci