bnboot {bnlearn}R Documentation

Parametric and nonparametric bootstrap of Bayesian networks

Description

Apply a user-specified function to Bayesian networks learned from bootstrap samples of the original data.

Usage

bnboot(data, statistic, R = 200, m = nrow(data),
  sim = "ordinary", algorithm, algorithm.args = list(),
  statistic.args = list(), debug = FALSE)

Arguments

data a data frame, containing the variables in the model.
statistic a function or a character string (the name of a function) to be applied to each bootstrap replicate.
R a positive integer, the number of bootstrap replicates.
m a positive integer, the size of each bootstrap replicate.
sim a character string indicating the type of simulation required. Possible values are "ordinary" (the default) and "parametric".
algorithm a character string, the learning algorithm to be applied to the bootstrap replicates. Possible values are gs, iamb, fast.iamb, inter.iamb, mmpc and hc. See bnlearn-package and documentation of each algorithm for details.
algorithm.args a list of extra arguments to be passed to the learning algorithm.
statistic.args a list of extra arguments to be passed to the function specified by statistic.
debug a boolean value. If TRUE a lot of debugging output is printed; otherwise the function is completely silent.

Value

A list containing the results of the calls to statistic.

Author(s)

Marco Scutari

References

Friedman N, Goldszmidt M, Wyner A (1999). "Data Analysis with Bayesian Networks: A Bootstrap Approach". In "UAI '99: Proceedings of the 15th Annual Conference on Uncertainty in Artificial Intelligence", pp. 196-20. Morgan Kaufmann.

See Also

constraint-based algorithms, local discovery algorithms, score-based algorithms, hybrid algorithms.

Examples

## Not run: 
data(learning.test)
bnboot(data = learning.test, R = 2, m = 500, algorithm = "gs",
  statistic = arcs)
# [[1]]
#      from to
# <arcs for the first replicate>
#
# [[2]]
#      from to
# <arcs for the second replicate>
## End(Not run)

[Package bnlearn version 1.7 Index]