rbn: Generate random data from a given Bayesian network
Description
Generate random data from a given Bayesian network.
Usage
## S3 method for class 'bn':
rbn(x, n = 1, data, fit = "mle", \dots, debug = FALSE)
## S3 method for class 'bn.fit':
rbn(x, n = 1, \dots, debug = FALSE)
Arguments
x
an object of class bn or bn.fit.
n
a positive integer giving the number of observations
to generate.
data
a data frame containing the data the Bayesian network
was learned from.
fit
a character string, the label of the method used to fit the
parameters of the newtork. See bn.fit for details.
...
additional arguments for the parameter estimation prcoedure,
see again bn.fit for details..
debug
a boolean value. If TRUE a lot of debugging output
is printed; otherwise the function is completely silent.
Value
A data frame with the same structure (column names and data types)
of the data parameter.