Simulating the effect of sample size on inference with constraint based algorithms. Given a parameterized Bayesian network, this simulation simulates data of a given sample size, learns undirected edges from the simulated data using a constraint-based algorithm, and collects the number of tests used in the inference as well as the number of true and false positives. Several iterations are conducted and the median number of tests, fp count and tp count is returned.
1 | sample_size_sim(net, N, algo, alpha = 0.05, m = 100, verbose = FALSE)
|
net |
a parameterized Bayesian network of class bn.fit |
m |
the number of iteration |
a |
numeric vector of sample size values |
a |
constraint-based algorithm gs, iamb, fast.iamb, inter.iamb |
the |
target nominal type I error rate |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.