Skip to content

simDAG

Simulate Data from a (Time-Dependent) Causal DAG

v1.0.0 · May 14, 2026 · GPL (>= 3)

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

13 OK
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
ERROR r-devel-linux-x86_64-debian-gcc

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
ERROR r-release-macos-x86_64

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
ERROR r-devel-linux-x86_64-fedora-clang

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
ERROR r-devel-linux-x86_64-debian-clang

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
ERROR r-devel-windows-x86_64

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
ERROR r-release-linux-x86_64

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
ERROR r-release-windows-x86_64

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
ERROR r-oldrel-windows-x86_64

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

Dependency Network

Dependencies Reverse dependencies data.table Rfast rlang igraph dagitty ggdag simDAG

Version History

15 tracked
updated 1.0.0 ← 0.5.2 diff May 14, 2026
updated 0.5.2 ← 0.5.1 diff Mar 30, 2026
new 0.5.1 Mar 10, 2026
updated 0.5.0 ← 0.4.1 diff Jan 7, 2026
updated 0.4.1 ← 0.4.0 diff Oct 14, 2025
updated 0.4.0 ← 0.3.2 diff Aug 26, 2025
updated 0.3.2 ← 0.3.1 diff Jun 23, 2025
updated 0.3.1 ← 0.3.0 diff May 27, 2025
updated 0.3.0 ← 0.2.2 diff Mar 29, 2025
updated 0.2.2 ← 0.2.1 diff Feb 22, 2025
updated 0.2.1 ← 0.2.0 diff Jan 6, 2025
updated 0.2.0 ← 0.1.2 diff Sep 2, 2024
updated 0.1.2 ← 0.1.1 diff Jun 12, 2024
updated 0.1.1 ← 0.1.0 diff Mar 6, 2024
new 0.1.0 Aug 27, 2023