simDAG {causalDisco} | R Documentation |
Simulates a random directed acyclic graph adjacency (DAG) matrix with the provided edge sparsity. The edge sparsity is the percentage of edges that are absent, relative to a fully connected DAG.
simDAG(p, sparsity = NULL, sparsityLim = c(0, 0.8), permute = TRUE)
p |
The number of nodes. |
sparsity |
If |
sparsityLim |
A vector of two numerics, both must be in [0,1]. |
permute |
If |
An adjacency matrix.
# Simulate a DAG adjacency matrix with 5 nodes
simDAG(5)