Skip to content

simDAG

Simulate Data from a (Time-Dependent) Causal DAG

v0.5.2 · Mar 30, 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 (2025) <doi:10.48550/arXiv.2506.01498>.

Downloads

689

Last 30 days

5391st

2K

Last 90 days

5.6K

Last year

Trend: -0.4% (30d vs prior 30d)

CRAN Check Status

14 OK
Show all 14 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-macos-arm64 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 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

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