simu8nod: simulates values for a node

Description Usage Arguments Value Examples

Description

From the data frame X where the possible parents must exist, a simulation is done for the node nod. The number of values to simulate is given by the X row number, so it must be present (even with zero columns) for ancestor nodes.
The function returns an augmented data frame with a new column (or more according to nod@format) in last position(s) containing the simulated values.

Usage

1
simu8nod(nod, X=100, add=TRUE)

Arguments

nod

/nod/ object to be simulated.

X

Data frame of the previous simulated nodes in columns. For ancestor nodes can have zero columns or more simply be an integer indicating the desired number of simulations, as it is in the default.

add

Must the matrix X be augmented, or only the the new columns returned?

Value

Data frame with the simulated and retained column(s) possibly as an augmentation of the inputted X.

Examples

1
2
3
4
5
 prr3k("RESET"); # For R checking compliance
 X1 <- simu8nod(prr.nod1, 11);
 X2 <- simu8nod(prr.nod2, X1);
 X3 <- simu8nod(prr.nod3, X2);
 simu8nod(prr.nod4, 14);

prr documentation built on May 2, 2019, 6:35 p.m.

Related to simu8nod in prr...