A DAG over some unobserved variables and some observed variables, where all the observed variables are categorical, and the unobserved variables have no restriction.
Arguments
- caugi_graph
A caugi DAG
- latent.pattern
A regular expression that is used to identify latent variables
- nvals
A named numeric vector specifying the number of categories for each of the observed variables. If not specified, then 2 categories are assumed
- latent.variable
A character vector indicating which variables are latent. If not NULL, then `latent.pattern` is ignored
Value
An object of class `dhvm`, which is a list with the caugi object, and a data.frame with the node information
Examples
ivd1 <- dhvm(caugi(Z %-->% X %-->% Y, U %-->% X + Y))
ivd2 <- dhvm(caugi(Z %-->% X %-->% Y, U %-->% X + Y), latent.variables = "U")
ivd3 <- dhvm(caugi(Z %-->% X %-->% Y, U %-->% X + Y), nvals = c(Z = 3))