extracts a chain from a chain

Share:

Description

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

Usage

1
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

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

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.