Learn R Programming

gmgm (version 1.1.2)

add_nodes: 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)

Value

The gmbn or gmdbn object after adding the 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.

See Also

add_arcs, relevant, remove_arcs, remove_nodes, rename_nodes

Examples

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

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

Run the code above in your browser using DataLab