Description Usage Arguments Details Examples
A set Z d-separates a path p if (1) Z contains a non-collider
on p, e.g. x->m->y with Z=c("m")
; or (2) some collider on p is not
on Z, e.g. x->m<-y with Z=c()
.
1 2 3 | dconnected(x, X, Y = list(), Z = list())
dseparated(x, X, Y = list(), Z = list())
|
x |
the input graph, a DAG, PDAG, or MAG. |
X |
vector of variable names. |
Y |
vector of variable names. |
Z |
vector of variable names.
|
The functions also work for mixed graphs with directed, undirected, and bidirected edges. The definition of a collider in such graphs is: a node where two arrowheads collide, e.g. x<->m<-y but not x->m–y.
1 2 3 4 | dconnected( "dag{x->m->y}", "x", "y", c() ) # TRUE
dconnected( "dag{x->m->y}", "x", "y", c("m") ) # FALSE
dseparated( "dag{x->m->y}", "x", "y", c() ) # FALSE
dseparated( "dag{x->m->y}", "x", "y", c("m") ) # TRUE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.