Learn R Programming

rbmn (version 0.9-6)

generate8nbn: returns a randomly built /nbn/ object.

Description

To obtain systematic results, you have to call set.seed before hands.

Usage

generate8nbn(rnn=c(3, 7), ppar=0.5, rreg=c(-1, 1), rmu=c(0, 0), rsig=c(0, 1),
	  nona=r.form3names(max(rnn)))

Value

a /nbn/ object, with nodes in topological order.

Arguments

rnn

Range of the number of nodes.

ppar

Probabilities (not a range) of the parent occurrence for each ancestor of every node. Can be a vector, cycled as necessary.

rreg

Range of regression coefficients.

rmu

Range of the conditional expectations.

rsig

Range of the conditional standard deviations.

nona

Proposed names for the maximum number of nodes, only the necessary first ones will be used.

Details

Node numbers are uniformly drawn. Parent numbers are independently drawn from all ancestors with the probability associated to the considered node. Regression coefficient are uniformly drawn. Conditional expectations and standard deviations are uniformly drawn.
All range arguments can be given one value instead of two, to precise the unique value to use.

Examples

Run this code
 set.seed(1234)
 print8nbn(generate8nbn());
 print8nbn(generate8nbn());

Run the code above in your browser using DataLab