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