Simulate a Directed Acyclic Graph (ABN) with arbitrary arc density.
simulateDag(node.name = NULL, data.dists = NULL, edge.density = 0.5)
a vector of character giving the names of the nodes. It gives the size of the simulated DAG.
named list giving the distribution for each node in the network. If not provided it will be sample and returned.
a real number between 0 and 1 giving the network density.
This function generates DAGs by sampling triangular matrices and reorder columns and rows randomly. The network density (
edge.density) is used column-wise as binomial sampling probability. Then the matrix is named using the user-provided names.
An object of class
abnDag a named matrix and a named list giving the distribution for each node.
Further information about abn can be found at:
## Example using Ozon entries: dist <- list(Ozone="gaussian", Solar.R="gaussian", Wind="gaussian", Temp="gaussian", Month="gaussian", Day="gaussian") out <- simulateDag(node.name = names(dist), data.dists = dist, edge.density = 0.8) plot(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.