View source: R/simulation_helpers.R
random_dag | R Documentation |
Simulates a directed acyclic graph (DAG) and returns its adjacency matrix. Copyright (c) 2013 Jonas Peters peters@math.ku.dk. All rights reserved.
random_dag(p, prob_connect, caus_order = sample(p, p, replace = FALSE))
p |
Integer — greater than 0. Number of nodes. |
prob_connect |
Numeric — between 0 and 1. The probability that an edge
|
caus_order |
Numeric vector. The causal order of the DAG. If the argument is not provided it is generated randomly. |
Square binary matrix. A matrix representing the random DAG.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.