Extract the dependency subtree of a staged tree with respect to
a variable
Usage
depsubtree(object, var, other_stages = c("NA", "indep", "full"))
Value
an object of class sevt representing the
dependency sub-tree.
Arguments
object
an object of class sevt.
var
the name of one of the variable of the staged event tree.
other_stages
how to set stages for other variables (if any).
Details
The dependency sub-tree is a staged event tree which is
sufficient to describe the conditional distribution of the variable
var given its predecessors in the original tree represented by
object.
In particular the preceding variables are restricted to the
parents of var in the minimal-DAG obtained with
as_parentslist. This is the minimal set of
variables which contexts are sufficient to fully represent the
conditional distribution of var.
Stages for variables different from var are either set to
NA, or to the full or indep model, depending on other_stages.