simDAG
Simulate Data from a (Time-Dependent) Causal DAG
Description
Simulate complex data from a given directed acyclic graph and information about each individual node. Root nodes are simply sampled from the specified distribution. Child Nodes are simulated according to one of many implemented regressions, such as logistic regression, linear regression, poisson regression or any other function. Also includes a comprehensive framework for discrete-time simulation, discrete-event simulation, and networks-based simulation which can generate even more complex longitudinal and dependent data. For more details, see Robin Denz, Nina Timmesfeld (2026) <doi:10.18637/jss.v116.i02>.
Downloads
619
Last 30 days
5761st
1.9K
Last 90 days
6.2K
Last year
Trend: +6% (30d vs prior 30d)
CRAN Check Status
Show all 13 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | OK |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-arm64 | OK |
| r-oldrel-macos-x86_64 | OK |
| r-oldrel-windows-x86_64 | OK |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check History
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 7, 2026
tests
Running ‘testthat.R’ [68s/97s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(simDAG) > library(testthat) > library(data.table) Attaching package: 'data.table' The following object is masked from 'package:b ...[truncated]... 8. └─base::sink(file = file, append = append, type = "output", split = split) 9. └─base::file(file, if (append) "a" else "w") [ FAIL 1 | WARN 17 | SKIP 55 | PASS 1053 ] Error: ! Test failures. Execution halted
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 2, 2026
ERROR 11 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 25, 2026
whether package can be installed
Installation failed. See ‘/Volumes/Builds/packages/big-sur-x86_64/results/4.6/simDAG.Rcheck/00install.out’ for details.
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 3, 2026
ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 27, 2026
whether package can be installed
Installation failed. See ‘/data/gannet/ripley/R/packages/tests-clang/simDAG.Rcheck/00install.out’ for details.
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 17, 2026
ERROR 9 OK · 0 NOTE · 0 WARNING · 5 ERROR · 0 FAILURE Mar 10, 2026
tests
Running ‘testthat.R’ [116s/179s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(simDAG)
> library(testthat)
> library(data.table)
Attaching package: 'data.table'
The following object is masked from 'package
...[truncated]...
random effect with non-default link ──
Expected `round(mean(data$Y), 3)` to equal `-1.99`.
Differences:
`actual`: -1.9950
`expected`: -1.9900
[ FAIL 12 | WARN 14 | SKIP 54 | PASS 1012 ]
Error:
! Test failures.
Execution halted
tests
Running 'testthat.R' [111s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(simDAG)
> library(testthat)
> library(data.table)
Attaching package: 'data.table'
The following object is masked from 'package:base
...[truncated]...
random effect with non-default link ──
Expected `round(mean(data$Y), 3)` to equal `-1.99`.
Differences:
`actual`: -1.9950
`expected`: -1.9900
[ FAIL 12 | WARN 14 | SKIP 54 | PASS 1012 ]
Error:
! Test failures.
Execution halted
tests
Running ‘testthat.R’ [107s/170s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(simDAG)
> library(testthat)
> library(data.table)
> library(igraph)
Attaching package: 'igraph'
The following object is mask
...[truncated]...
random effect with non-default link ──
Expected `round(mean(data$Y), 3)` to equal `-1.99`.
Differences:
`actual`: -1.9950
`expected`: -1.9900
[ FAIL 12 | WARN 14 | SKIP 54 | PASS 1012 ]
Error:
! Test failures.
Execution halted
tests
Running 'testthat.R' [141s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(simDAG)
> library(testthat)
> library(data.table)
> library(igraph)
Attaching package: 'igraph'
The following object is masked fr
...[truncated]...
random effect with non-default link ──
Expected `round(mean(data$Y), 3)` to equal `-1.99`.
Differences:
`actual`: -1.9950
`expected`: -1.9900
[ FAIL 12 | WARN 14 | SKIP 54 | PASS 1012 ]
Error:
! Test failures.
Execution halted
tests
Running 'testthat.R' [155s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(simDAG)
> library(testthat)
> library(data.table)
> library(igraph)
Attaching package: 'igraph'
The following object is masked fr
...[truncated]...
random effect with non-default link ──
Expected `round(mean(data$Y), 3)` to equal `-1.99`.
Differences:
`actual`: -1.9950
`expected`: -1.9900
[ FAIL 12 | WARN 14 | SKIP 54 | PASS 1012 ]
Error:
! Test failures.
Execution halted