Creates a DAG according to given parameters.
create_random_DAG(
node_num,
prob,
eff_min = -1,
eff_max = 1,
node_labels = paste0("n", as.character(seq_len(node_num))),
max_par = 3
)
Number of nodes
Probability of creating an edge
Lower bound for edge weights
Upper bound for edge weights
Node labels
Maximal number of parents
graph
dag <- create_random_DAG(30, 0.2)