Changelog
Source:NEWS.md
simDAG 0.1.1
CRAN release: 2024-03-07
Enhancements
-
node()
andnode_td()
now support character vectors in the ‘name’ argument, allowing easy creation of multiple nodes with the same definition
Bug Fixes
- There was a bug in the
node_time_to_event()
function that lead to theimmunity_duration
parameter being used incorrectly. Since events were still recorded correctly, this was only apparent when usingsave_states="all"
. Works correctly now. - There was a small bug in
dag2matrix()
if the dag object contained only root nodes. In this case, a logical matrix was returned. Now it returns the correct numeric matrix.
New Features
- Added the
sim_n_datasets()
function to generate multiple datasets from a single dag object, possibly using multicore processing
Documentation
- Minor changes to documentation pages
- Minor changes to vignettes
simDAG 0.1.2
CRAN release: 2024-06-13
General
-
simDAG
no longer listsdata.table
under “Depends” in the description file. It is instead listed under “Imports” as recommended by thedata.table
crew
Enhancements
- Print underlying structural equations in
summary.DAG()
andsummary.DAG.node()
- Added the
overlap
argument to bothlong2start_stop()
andsim2data()
to directly create start-stop data with overlapping durations, as needed for some statistical models - Added the
target_event
andkeep_only_first
arguments tosim2data()
and related functions, to allow direct transformation into model-ready dataset - Made the
long2start_stop()
function more computationally efficient
Bug Fixes
- Fixed a small bug in input checks of the
node_time_to_event()
function, which printed an error when not all arguments toprob_fun
were supplied, even when these arguments had default values - Fixed bug in
print.DAG.node()
which occurred when a time-to-event node with no parents was supplied - Fixed a bug in
sim2data()
which lead to inconsistent results whenevent_duration=0
was used in one or more nodes of type “time_to_event” or “competing_events”. This made me realize that event durations smaller than 1 make no sense. They are now no longer allowed and the default of the node types has been changed accordingly. - Fixed a bug that resulted in errors when interaction terms were being supplied through
formula
objects of child nodes
New Features
- Added the
as.igraph.DAG()
method which extends the generic functionas.igraph()
to conveniently parseDAG
objects toigraph
objects - Added
as.data.table.simDT()
andas.data.frame.simDT()
for user convenience
Documentation
- Documentation pages of most nodes now include formal descriptions of the data generation mechanism
- Re-wrote the documentation page for custom node definition
simDAG 0.2.0
CRAN release: 2024-09-03
Enhancements
- Added the
output
argument to therbernoulli()
function to allow different output formats. - Change default of
sort_dag
insim_from_dag()
fromTRUE
toFALSE
. - Moved the functionality of the
coerce2factor
andcoerce2numeric
arguments inrcategorical()
,node_multinomial()
andnode_binomial()
to theoutput
argument for a more consistent syntax and easier usage. - It is now allowed to directly supply functions to the
type
argument innode()
andnode_td()
. - Passing optional arguments to the
layout
function inplot.DAG()
is now supported.
Bug Fixes
- The
node_fill
argument of theplot.DAG()
function is no longer being ignored ifmark_td_nodes
was set toTRUE
.
New Features
- Added a new enhanced formula interface, which allows users to directly type out the underlying structural equations for many node types. This replaces the old
formula
argument. Standard formulas (without betas and intercepts) are still supported, but no longer mentioned in the documentation and will be deprecated in future versions.
Documentation
- Added a new vignette explaining in detail how the new enhanced formula interface for the
node()
function works.
simDAG 0.2.1
Enhancements
- External variables may now be used in the formula interface using
eval()
calls. - Added the
remove_not_at_risk
argument to thesim2data()
function.
Documentation
- Added more examples in the formula vignette.