Learn R Programming

caugi (version 1.1.0)

normalize_latent_structure: Normalize latent structure in a DAG

Description

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).

Usage

normalize_latent_structure(cg, latents)

Value

A caugi object of class "DAG".

Arguments

cg

A caugi object of class "DAG".

latents

Character vector of latent node names.

References

Evans, R. J. (2016). Graphs for margins of Bayesian networks. Scandinavian Journal of Statistics, 43(3), 625–648. tools:::Rd_expr_doi("10.1111/sjos.12194")

See Also

Other operations: condition_marginalize(), dag_from_pdag(), exogenize(), latent_project(), meek_closure(), moralize(), mutate_caugi(), skeleton()

Examples

Run this code
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"))

Run the code above in your browser using DataLab