| normalize_latent_structure | R Documentation |
Normalizes a DAG with latent variables while preserving the induced marginal model over the observed variables. This is done by:
(1) exogenizing all latent nodes (making them parentless), (2) removing exogenous latent nodes with at most one child, and (3) removing exogenous latent nodes whose child sets are strict subsets of another latent node's child set.
This corresponds to Lemmas 1–3 in Evans (2016).
normalize_latent_structure(cg, latents)
cg |
A |
latents |
Character vector of latent node names. |
A caugi object of class "DAG".
Evans, R. J. (2016). Graphs for margins of Bayesian networks. Scandinavian Journal of Statistics, 43(3), 625–648. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/sjos.12194")}
Other operations:
condition_marginalize(),
count_dags(),
dag_from_pdag(),
enumerate_dags(),
exogenize(),
latent_project(),
meek_closure(),
moralize(),
mutate_caugi(),
skeleton()
dag <- caugi(
A %-->% U,
U %-->% X + Y,
class = "DAG"
)
normalize_latent_structure(dag, latents = "U")
# More complex example with two latents and nested child sets
dag2 <- caugi(
A %-->% U,
U %-->% X + Y + Z,
U2 %-->% Y + Z,
class = "DAG"
)
normalize_latent_structure(dag2, c("U", "U2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.