gies
or ges
the preference over gds
.gds(p, targets, score, verbose = FALSE, ...)
list
of intervention targets
(cf. details). A list of vectors, each vector listing the vertices
of one intervention target.Score
.TRUE
, detailed output is provided.gds
returns a list with the following two components:EssGraph
containing an
estimate of the equivalence class of the underlying DAG.ParDAG
containing a (random) representative of the estimated equivalence class.targets
as a
list of (integer) vectors listing the intervened vertices; observational
data is specified by an empty set, i.e. a vector of the form
integer(0)
. As an example, if data contains observational samples
as well as samples originating from an intervention at vertices 1 and 4,
the intervention targets must be specified as list(integer(0),
as.integer(1), as.integer(c(1, 4)))
.
An interventional Markov equivalence class of DAGs can be uniquely
represented by a partially directed graph called interventional essential
graph. Its edges have the following interpretation:
score
) of a DAG in three phases,
starting from the empty DAG:
[object Object],[object Object],[object Object]
GIES cycles through these three phases until no augmentation of the score is
possible any more. In the end, gds
returns the (interventional or
observational) essential graph of the last visited DAG.
It is well-known that a greedy search in the space of DAGs instead of
essential graphs is more prone to be stuck in local optima of the score
function and hence expected to yield worse estimation results than GIES
(function gies
) or GES (function ges
) (Chickering,
2002; Hauser and Bühlmann, 2012). The
function gds
is therefore not of practical use, but can be used
to compare causal inference algorithms to an elementary and straight-forward
approach.gies
, ges
, Score
,
EssGraph
## Load predefined data
data(gmInt)
## Define the score (BIC)
score <- new("GaussL0penIntScore", gmInt$x, gmInt$targets, gmInt$target.index)
## Estimate the essential graph
gds.fit <- gds(ncol(gmInt$x), gmInt$targets, score)
## Plot the estimated essential graph and the true DAG
if (require(Rgraphviz)) {
par(mfrow=c(1,2))
plot(gds.fit$essgraph, main = "Estimated ess. graph")
plot(gmInt$g, main = "True DAG")
}
Run the code above in your browser using DataLab