create_random_DAG: Create random DAG (topologically ordered)

View source: R/utils.R

create_random_DAGR Documentation

Create random DAG (topologically ordered)

Description

Creates a DAG according to given parameters.

Usage

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
)

Arguments

node_num

Number of nodes

prob

Probability of creating an edge

eff_min

Lower bound for edge weights

eff_max

Upper bound for edge weights

node_labels

Node labels

max_par

Maximal number of parents

Value

graph

Author(s)

Martin Pirkl

Examples

dag <- create_random_DAG(30, 0.2)

kpj/dce documentation built on Oct. 29, 2022, 1:40 a.m.