simDAG 0.4.1
New Features
- Added the
linkargument tonode_gaussian(),node_binomial(),node_poisson(),node_negative_binomial()andnode_zeroinfl()to allow different link functions when generating data from these nodes. - Added the
as.dagitty.DAG()function to allow direct conversion ofDAGobjects todagittyobjects.
Bug Fixes
- Previously, the
sim_n_datasets()function usedstats::runif(1)as a default for theseedargument. Because seeds are coerced to integers inset.seed(), this essentially meant theseedargument was always set to 0 (unless changed by the user), which was not intended. We changed the default to beNULL, which is equivalent to not setting aseed. This might change results obtained using previous versions. To get the same result as in previous versions, useseed=0orseed=stats::runif(1). - Fixed a bug that occurred when calling
node()ornode_td()inside a function with objects passed toparentsorformula.
Documentation
- Added explanations for how to simulate data for Cox models with time-varying covariates and Aalen additive hazards models with time-varying covariates to the cookbook vignette.