Learn R Programming

rbmn (version 0.9-6)

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

Value

The resulting chain

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.

Examples

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

Run the code above in your browser using DataLab