chain4chain: extracts a chain from a chain

View source: R/f02.chain.code.r

chain4chainR Documentation

extracts a chain from a chain

Description

returns the chain obtained from chain retaining only nodes indicated by nodes and conditioned with nodes indicated in condi.

Usage

chain4chain(chain, nodes, condi=numeric(0), value=rep(0, length(condi)))

Arguments

chain

The chain object to consider.

nodes

numeric (or character) vector giving the numbers (or names) of the nodes to be retained in the extracted chain.

condi

numeric (or character) vector giving the numbers (or names) of the conditioning nodes for the extracted chain.

value

Numerical values associated to condi.

Details

Integration is done for nodes not belonging to the extracted chain nor being in the conditioning subset. Then the distribution of the retained nodes is left identical to this in the initial chain.

Value

The resulting chain

Examples

 chain4chain(rbmn0chain.02, c("a", "d"), c("b"), 12);

rbmn documentation built on July 9, 2023, 6:37 p.m.