add_nodes {gmgm}R Documentation

Add nodes to a Gaussian mixture graphical model

Description

This function adds nodes to a Gaussian mixture graphical model. If this model is a dynamic Bayesian network, the nodes are added to each of its transition models. For each added node, a one-component univariate Gaussian mixture model is created with mean 0 and variance 1.

Usage

add_nodes(gmgm, nodes)

Arguments

gmgm

An object of class gmbn or gmdbn. If NULL, a gmbn object is created with the added nodes.

nodes

A character vector containing the added nodes.

Value

The gmbn or gmdbn object after adding the nodes.

See Also

add_arcs, relevant, remove_arcs, remove_nodes, rename_nodes

Examples

data(gmbn_body)
gmbn_1 <- add_nodes(gmbn_body, c("CHOL", "TRIGLY"))

data(gmdbn_air)
gmdbn_1 <- add_nodes(gmdbn_air, "PM10")


[Package gmgm version 1.1.2 Index]