2
\title{Check Consistency of Conditional Independence for a Triple of Nodes}
4
"An Rd file exposing an ESS bug in (ess-next-code-line) :
5
Jump to '\examples{' and the first code line (= all '##...') and
6
use C-c C-n to send it to R. It works, *but* point does not advance to
7
the next line; but rather jumps backward to the 50'percent' line.
8
Adding a percent 'o/o' sign here ``fixes'' this bug (so I don't do it) "
10
checkTriple(version.unf = c(NA, NA),
11
maj.rule = FALSE, verbose = FALSE)
15
(integer) vector of length two: .............}
16
\item{maj.rule}{logical indicating that the following majority rule
17
is applied: if \code{b} is in less than
18
50\% of the checked sepsets, we say that \code{b} is in \bold{no} sepset. If
19
\code{b} is in more than 50\% of the checked sepsets, we say that
20
\code{b} is in \bold{all} sepsets. If \code{b} is in exactly 50\% of the
21
checked sepsets, the triple is considered \sQuote{ambiguous}.}
22
\item{verbose}{Logical asking for detailed output of intermediate steps.}
25
For each subset .........
28
D. Colombo and M.H. Maathuis (2013).
29
Order-independent constraint-based causal structure learning,
34
##################################################
35
## Using Gaussian Data
36
##################################################
37
## Load predefined data
42
## define independence test (partial correlations), and test level
43
indepTest <- gaussCItest
45
## define sufficient statistics
46
suffStat <- list(C = cor(gmG8$x), n = n)
49
pc.fit <- pc(suffStat, indepTest, p=p, alpha=alpha, verbose = TRUE)
51
if (require(Rgraphviz)) {
52
## show estimated CPDAG
54
plot(pc.fit, main = "Estimated CPDAG")
55
plot(gmG8$g, main = "True DAG")
58
checkTriple(a = 6, b = 1, c = 8,
61
sepsetA = pc.fit@sepset[[a]][[c]],
62
sepsetC = pc.fit@sepset[[c]][[a]],
63
suffStat=suffStat, indepTest=indepTest, alpha=alpha,