simDAG {causalDisco} | R Documentation |
Simulate a random DAG
Description
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.
Usage
simDAG(p, sparsity = NULL, sparsityLim = c(0, 0.8), permute = TRUE)
Arguments
p |
The number of nodes. |
sparsity |
If |
sparsityLim |
A vector of two numerics, both must be in [0,1]. |
permute |
If |
Value
An adjacency matrix.
Examples
# Simulate a DAG adjacency matrix with 5 nodes
simDAG(5)
[Package causalDisco version 0.9.1 Index]