sim_DAG: Generate Multi-connected DAG

Description Usage Arguments Value Examples

Description

An alternative to the scale-free DAG generating Barabasi algorithm in igraph.. This function currently only outputs one leaf node.

Usage

1
sim_DAG(n, method = "ic-dag")

Arguments

n

Number of nodes

method

the algorithm used in simulation. The default is Ide's and Cozman's DAG algorithm in the bnlearn package, which generates DAGs with more connectivity. See the random.graph function in bnlearn for details.

Value

An igraph object

Examples

1
2
g <- sim_DAG(10)
igraphviz(g)

robertness/lucy documentation built on May 27, 2019, 10:32 a.m.