# NOT RUN {
## Load predefined data
data(gmG)
## Define the score (BIC)
score <- new("GaussL0penObsScore", gmG8$x)
## Estimate the essential graph using GES
ges.fit <- ges(score)
essgraph <- ges.fit$essgraph
## Plot the estimated essential graph
if (require(Rgraphviz)) {
plot(essgraph, main = "Estimated CPDAG")
}
## The CPDAG has 1 unoriented component with 3 edges (Author <-> Bar, Bar <->
## Ctrl, Bar <-> V5)
## Get optimal single-vertex and unbounded intervention target
opt.target(essgraph, max.size = 1)
opt.target(essgraph, max.size = essgraph$node.count())
# }
Run the code above in your browser using DataLab