cid {stagedtrees} | R Documentation |
Context specific interventional discrepancy
Description
Compute the context specific interventional discrepeancy of a staged tree with respect to a reference staged tree.
Usage
cid(object1, object2, FUN = mean)
Arguments
object1 |
an object of class |
object2 |
an object of class |
FUN |
a function that is used to aggregate CID for each variable.
The default |
Value
A list with components:
-
wrong
a stages-like structure which record whereobject2
wrongly infer the interventional distance with respect toobject1
. -
cid
the value of the computed CID.
References
Leonelli M., Varando G. Context-Specific Causal Discovery for Categorical Data Using Staged Trees, The 26th International Conference on Artificial Intelligence and Statistics (AISTATS), 2023, https://arxiv.org/abs/2106.04416
Examples
model1 <- stages_bhc(full(Titanic))
model2 <- stages_bhc(full(Titanic,
order = c("Survived", "Sex", "Age", "Class")
))
cid(model1, model2)$cid
cid(model1, model2)$wrong
[Package stagedtrees version 2.3.0 Index]