Learn R Programming

BayesNetBP (version 1.6.1)

Sampler: Sampling from the Bayesian network

Description

Sampling from the joint distribution of all applicable nodes in the Bayesian network.

Usage

Sampler(tree, n)

Arguments

tree

a '>ClusterTree object

n

a integer number of observations to generate

Value

a dataframe of generated data

References

Cowell, R. G. (2005). Local propagation in conditional Gaussian Bayesian networks. Journal of Machine Learning Research, 6(Sep), 1517-1550.

Yu H, Moharil J, Blair RH (2020). BayesNetBP: An R Package for Probabilistic Reasoning in Bayesian Networks. Journal of Statistical Software, 94(3), 1-31. <doi:10.18637/jss.v094.i03>.

Examples

Run this code
# NOT RUN {
data(toytree)
Sampler(tree = toytree, n = 10)

# }

Run the code above in your browser using DataLab