Last chance! 50% off unlimited learning
Sale ends in
fciPlus(suffStat, indepTest, alpha, labels, p, verbose=TRUE)
list
containing all necessary elements for the conditional independence
decisions in the function indepTest
.function
for testing conditional
independence. The function is internally called as
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 with all
relevant information, see above. The return value of
indepTest()
is the p-value of the test for conditional
independence.character
vector of variable (or
“node”) names. Typically preferred to specifying p
.labels
are not, in which case labels
is set to
1:p
.class
fciAlgo
(see
fciAlgo
) containing the estimated graph
(in the form of an adjacency matrix with various possible edge marks),
the conditioning sets that lead to edge removals (sepset) and several other
parameters.
fci
.
fci
for estimating a PAG using the FCI algorithm.
##################################################
## Example without latent variables
##################################################
## generate a random DAG ( p = 7 )
set.seed(42)
p <- 7
myDAG <- randomDAG(p, prob = 0.4)
## find PAG using the FCI+ algorithm on "Oracle"
suffStat <- list(C = cov2cor(trueCov(myDAG)), n = 10^9)
m.fci <- fciPlus(suffStat, indepTest=gaussCItest,
alpha = 0.9999, p=p)
summary(m.fci)
## require("Rgraphviz")
sfsmisc::mult.fig(2, main="True DAG // fciPlus(.) \"oracle\" estimate")
plot(myDAG)
plot(m.fci)
Run the code above in your browser using DataLab