condition_marginalize: Marginalize and/or condition on variables in an ancestral graph (AG)
Description
Marginalize variables out of an AG, and/or condition on variables.
Depending on the structure, it could produce a graph with directed,
bidirected, and undirected edges.
Definition 4.2.1 in Thomas Richardson. Peter Spirtes. "Ancestral graph
Markov models." Ann. Statist. 30 (4) 962 - 1030, August 2002.
tools:::Rd_expr_doi("10.1214/aos/1031689015")
See Also
Other operations:
exogenize(),
latent_project(),
moralize(),
mutate_caugi(),
skeleton()
mg <- caugi(
U %-->% X + Y,
A %-->% X,
B %-->% Y,
class = "DAG")
condition_marginalize(mg, marg_vars = "U") # ADMGcondition_marginalize(mg, cond_vars = "U") # DAG