← Back to all sparks
S

simDAG

INFRA · APIS
Velocity2.5

Simulate Data from a (Time-Dependent) Causal DAG

simDAG grew a second simulation engine, then spent two releases surviving upstream breakage.

r-packagecausal-inferencedag-simulationdiscrete-event-simulationsurvival-models
Current state
simDAG generates data from directed acyclic graphs, with a library of node types covering Gaussian, binomial, Poisson, negative binomial, zero-inflated, ordered regression, Cox, and Aalen models. The 1.0.0 milestone opened node_cox() to arbitrary baseline hazard functions, which lets continuous time-dependent hazards drive discrete-event simulations. The two most recent releases exist only to keep the package on CRAN through breakage in lme4 and simr.
Where it's heading
The package has been widening what a simulation can represent rather than deepening any one node. Networks arrived in 0.4.0 so individuals could depend on each other, discrete-event simulation in continuous time arrived in 0.5.0 as an alternative to the discrete-time engine, and 1.0.0 connected the two by letting continuous hazards feed the event-driven path. Alongside that, node types keep accumulating for outcome families the framework could not previously generate.
Prediction
Expect the node library to keep expanding into outcome types the discrete-event engine can now support, though the recent releases suggest upstream dependency churn will keep consuming release slots.

Recent moves

  1. 18d ago

    CRAN-retention patch for upstream lme4 breakage

    A patch made solely to keep the package on CRAN after changes in lme4 broke simr. The maintainer notes the real fix is already available upstream from GitHub.

    View source ↗
  2. 3mo ago

    Arbitrary baseline hazards connect node_cox() to discrete-event sims

    The 1.0 milestone allows arbitrary baseline hazard functions in node_cox(), which connects continuous time-dependent hazards to the discrete-event engine added in 0.5.0. The two simulation paths stop being separate options and start composing.

    View source ↗
  3. 4mo ago

    Test-only fix for an upstream simr update

    A release with no functional change, made only to fix tests failing on CRAN after an update to simr. The second such release in this window.

    View source ↗
  4. 5mo ago

    Adds node_polr() for ordinal outcomes and rsurv node support

    Adds an ordered logistic and probit node, extending generation to ordinal outcomes, and accepts the rsurv package's time-to-event nodes in discrete-event simulation. Ties in sim_discrete_event() are now handled automatically rather than through a user argument.

    View source ↗
  5. 7mo ago

    Adds continuous-time discrete-event simulation

    ⚡ SPARK

    The release that gave simDAG a second way to simulate. Everything since has been either extending the node library to feed this engine or connecting it to the older discrete-time path, which is what 1.0.0 completed.

    View source ↗
  6. 10mo ago

    Adds link functions to node types and fixes a broken seed default

    Adds link function arguments across five node types and direct conversion to dagitty objects. Also fixes a seed default that silently resolved to zero on every call, meaning prior multi-dataset simulations were less random than users expected.

    View source ↗