The simplest case of for testing conditional independence is one of three variables – two to compare, and one variable upon which to condition the comparison. These function generates a Gaussian Bayesian network structure composed of three variable subnetworks of the form B <- C -> A.
1 2 3 4 5 | build_triplet_network(m)
modify_triplet_cpd(reg_line, rho)
modify_triplet_cpds(net, rho)
|
rho |
the desired value of the correlation. |
net |
object of bn.fit, bn.fit.gnet |
Number |
of triplets. #' @param reg_line an element of the bn.fit.gnet class. This is treated here as a list element, since the class uses S3. The element is a regression line CPD, either of length 1 or 2. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.