Learn R Programming

simDAG (version 0.3.0)

empty_dag: Initialize an empty DAG object

Description

This function should be used in conjunction with multiple calls to node or node_td to create a DAG object, which can then be used to simulate data using the sim_from_dag and sim_discrete_time functions.

Usage

empty_dag()

Arguments

Value

Returns an empty DAG object.

Author

Robin Denz

Details

Note that this function is only used to initialize an empty DAG object. Actual information about the respective nodes have to be added using the node function or the node_td function. The documentation page of that function contains more information on how to correctly do this.

Examples

Run this code
library(simDAG)

# just an empty DAG
empty_dag()

# adding a node to it
empty_dag() + node("age", type="rnorm", mean=20, sd=5)

Run the code above in your browser using DataLab