Package: simDAG 0.2.0.9000

Robin Denz

simDAG: Simulate Data from a DAG and Associated Node Information

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 and more. Also includes a comprehensive framework for discrete-time simulation, which can generate even more complex longitudinal data.

Authors:Robin Denz [aut, cre], Katharina Meiszl [aut]

simDAG_0.2.0.9000.tar.gz
simDAG_0.2.0.9000.zip(r-4.5)simDAG_0.2.0.9000.zip(r-4.4)simDAG_0.2.0.9000.zip(r-4.3)
simDAG_0.2.0.9000.tgz(r-4.4-any)simDAG_0.2.0.9000.tgz(r-4.3-any)
simDAG_0.2.0.9000.tar.gz(r-4.5-noble)simDAG_0.2.0.9000.tar.gz(r-4.4-noble)
simDAG_0.2.0.9000.tgz(r-4.4-emscripten)simDAG_0.2.0.9000.tgz(r-4.3-emscripten)
simDAG.pdf |simDAG.html
simDAG/json (API)
NEWS

# Install 'simDAG' in R:
install.packages('simDAG', repos = c('https://robindenz1.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/robindenz1/simdag/issues

On CRAN:

7.32 score 8 stars 77 scripts 275 downloads 26 exports 18 dependencies

Last updated 2 months agofrom:9b39dc01a1. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 06 2024
R-4.5-winOKNov 06 2024
R-4.5-linuxOKNov 06 2024
R-4.4-winOKNov 06 2024
R-4.4-macOKNov 06 2024
R-4.3-winOKNov 06 2024
R-4.3-macOKNov 06 2024

Exports:add_nodedag_from_datadag2matrixdoempty_daglong2start_stopmatrix2dagnodenode_binomialnode_competing_eventsnode_conditional_distrnode_conditional_probnode_coxnode_gaussiannode_multinomialnode_negative_binomialnode_poissonnode_tdnode_time_to_eventrbernoullircategoricalrconstantsim_discrete_timesim_from_dagsim_n_datasetssim2data

Dependencies:clicpp11data.tableglueigraphlatticelifecyclemagrittrMatrixpkgconfigRcppRcppArmadilloRcppGSLRcppParallelRcppZigguratRfastrlangvctrs

Simulating Covid-19 Vaccine Data using a Discrete-Time Simulation

Rendered fromv_covid_example.Rmdusingknitr::rmarkdownon Nov 06 2024.

Last update: 2024-03-07
Started: 2022-09-19

Simulating Data from a known DAG

Rendered fromv_sim_from_dag.Rmdusingknitr::rmarkdownon Nov 06 2024.

Last update: 2024-04-26
Started: 2022-09-19

Simulating Data using a Discrete-Time Approach

Rendered fromv_sim_discrete_time.Rmdusingknitr::rmarkdownon Nov 06 2024.

Last update: 2024-06-05
Started: 2023-01-26

Specifying Formulas in a DAG

Rendered fromv_using_formulas.Rmdusingknitr::rmarkdownon Nov 06 2024.

Last update: 2024-09-17
Started: 2024-07-16

Readme and manuals

Help Manual

Help pageTopics
Simulate Data from a DAG and Associated Node InformationsimDAG-package
Add a 'DAG.node' object to a 'DAG' object+.DAG add_node
Transform a DAG object into an 'igraph' objectas.igraph.DAG
Fills a partially specified 'DAG' object with parameters estimated from reference datadag_from_data
Obtain a Adjacency Matrix from a 'DAG' objectdag2matrix
Pearls do-operator for 'DAG' objectsdo
Initialize an empty 'DAG' objectempty_dag
Transform a 'data.table' in the long-format to a 'data.table' in the start-stop formatlong2start_stop
Obtain a 'DAG' object from a Adjacency Matrix and a List of Node Typesmatrix2dag
Create a node object to grow a DAG step-by-stepnode node_td
Simulate a Node Using Logistic Regressionnode_binomial
Simulate a Time-to-Event Node with Multiple Mutually Exclusive Events in Discrete-Time Simulationnode_competing_events
Simulate a Node by Sampling from Different Distributions based on Stratanode_conditional_distr
Simulate a Node Using Conditional Probabilitiesnode_conditional_prob
Simulate a Node Using Cox-Regressionnode_cox
Create Your Own Function to Simulate a Root Node, Child Node or Time-Dependent Nodenode_custom
Simulate a Node Using Linear Regressionnode_gaussian
Simulate a Node Using Multinomial Regressionnode_multinomial
Simulate a Node Using Negative Binomial Regressionnode_negative_binomial
Simulate a Node Using Poisson Regressionnode_poisson
Simulate a Time-to-Event Node in Discrete-Time Simulationnode_time_to_event
Plot a 'DAG' objectplot.DAG
Create a Simple Flowchart for a Discrete-Time Simulationplot.simDT
Generate Random Draws from a Bernoulli Distributionrbernoulli
Generate Random Draws from a Discrete Set of Labels with Associated Probabilitiesrcategorical
Use a single constant value for a root noderconstant
Using Discrete-Time Simulation to Generate Complex Data from a Given DAG and Node Informationsim_discrete_time
Simulate Data from a Given DAG and Node Informationsim_from_dag
Generate multiple datasets from a single 'DAG' objectsim_n_datasets
Transform 'sim_discrete_time' output into the start-stop, long- or wide-formatas.data.frame.simDT as.data.table.simDT sim2data