add_arcs {gmgm} | R Documentation |
Add arcs to a Gaussian mixture graphical model
Description
This function adds arcs to a Gaussian mixture graphical model. For each added arc, a variable related to the start node is added to the Gaussian mixture model describing the local distribution over the end node and its parents, with mean 0 and variance 1 for each mixture component.
Usage
add_arcs(gmgm, arcs)
Arguments
gmgm |
An object of class |
arcs |
A data frame containing the added arcs. The column |
Value
The gmbn
or gmdbn
object after adding the arcs.
See Also
add_nodes
, relevant
,
remove_arcs
, remove_nodes
,
rename_nodes
Examples
data(gmbn_body)
gmbn_1 <- add_arcs(gmbn_body,
data.frame(from = c("GENDER", "AGE"),
to = c("GLYCO", "WEIGHT")))
data(gmdbn_air)
gmdbn_1 <- add_arcs(gmdbn_air,
list(b_2 = data.frame(from = "WIND", to = "NO2", lag = 1),
b_13 = data.frame(from = c("NO2", "NO2"),
to = c("O3", "O3"), lag = c(0, 1))))