directed acyclic graph approach to simulation

Simulator.GAD

Format

An object of class R6ClassGenerator of length 24.

Methods

new()

Starts a new GAD based simulator.

simulateWAY(numberOfBlocks, qw, ga, Qy, intervention, verbose)

Runs the simulation using the parameters provided. numberOfBlocks integer is used to specify the number of required simulated observations. qw is the underlying mechanism creating the covariate measurements. ga is the underlying mechanism creating the exposure measurements. Qy is the underlying mechanism creating the outcome measurements. intervention verbose The each of the qw, ga, Qy requires a list as parmeter, each having 3 fields: stochMech function the mechanism that is used to generate the underlying unmeasured confounders. These 'observations' form the basis of the data generative process. param vector with memories used to generate the dataset. Each entry in this vector is a coefficient for that point in history. Note that this also includes preceeding measurements within the current observation, i.e. W A Y -> A precedes Y, W precedes A, etc. If we would thus have a memory of c(0.1,0.5) for W, that would mean that the current measurement of W is generated using the Y in the previous measurment for 0.1, and A in the previous measurement for 0.5. rgen function

simulateWAYiidTrajectories(numberOfBlocks, numberOfTrajectories, qw, ga, Qy, intervention, verbose)

does the exact same as simulateWAY, however, this function also takes an numberOfTrajectories argument, in which one can specify how many concurrent time series should be generated. numberOfBlocks integer is used to specify the number of required simulated observations. numberOfTrajectories integer the number of concurrent time series should be generated qw is the underlying mechanism creating the covariate measurements. ga is the underlying mechanism creating the exposure measurements. Qy is the underlying mechanism creating the outcome measurements. intervention verbose