| m_separated | R Documentation |
Test whether two sets of nodes are m-separated given a conditioning set in an ancestral graph (AG) or an ADMG.
M-separation generalizes d-separation to AGs/ADMGs and applies to DAGs.
m_separated(
cg,
X = NULL,
Y = NULL,
Z = NULL,
X_index = NULL,
Y_index = NULL,
Z_index = NULL
)
cg |
A |
X, Y, Z |
Character vectors of node names, or |
X_index, Y_index, Z_index |
Optional numeric 1-based indices (exclusive
with |
A logical value; TRUE if X and Y are m-separated given Z.
Other queries:
ancestors(),
anteriors(),
children(),
components(),
descendants(),
districts(),
edge_types(),
edges(),
exogenous(),
is_acyclic(),
is_admg(),
is_ag(),
is_caugi(),
is_cpdag(),
is_dag(),
is_empty_caugi(),
is_mag(),
is_mpdag(),
is_pdag(),
is_simple(),
is_ug(),
markov_blanket(),
neighbors(),
nodes(),
parents(),
posteriors(),
same_nodes(),
spouses(),
subgraph(),
topological_sort()
# Classic confounding example
cg <- caugi(
L %-->% X,
X %-->% Y,
L %-->% Y,
class = "ADMG"
)
m_separated(cg, X = "X", Y = "Y") # FALSE (connected via L)
m_separated(cg, X = "X", Y = "Y", Z = "L") # TRUE (L blocks the path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.