showClass("pcAlgo")
## generate a pcAlgo object
p <- 8
set.seed(45)
myDAG <- randomDAG(p, prob = 0.3)
n <- 10000
d.mat <- rmvDAG(n, myDAG, errDist = "normal")
suffStat <- list(C = cor(d.mat), n = n)
pc.fit <- pc(suffStat, indepTest = gaussCItest, alpha = 0.01, p = p)
## use methods of class pcAlgo
show(pc.fit)
if(require(Rgraphviz))
plot(pc.fit, main = "Fitted graph")
summary(pc.fit)
## access slots of this object
(g <- pc.fit@graph)
str(ss <- pc.fit@sepset, max=1)
Run the code above in your browser using DataLab