Learn R Programming

simcausal (version 0.1)

simfull: Simulate Full Data (From Action/Intervention DAG(s))

Description

This function simulates full data based on a list of intervention DAGs, returning a list of data.frames

Usage

simfull(actions, n, wide = TRUE, LTCF = NULL, rndseed = NULL)

Arguments

actions
Actions specifying the counterfactual DAG. This argument must be either an object of class DAG.action or a list of DAG.action objects.
n
Number of observations to sample.
wide
A logical, if TRUE the output data is generated in wide format, if FALSE, the output longitudinal data in generated in long format
LTCF
The name of the right-censoring / failure event indicator variable for the Last Time-point Carried Forward imputation. By default, when LTCF is left unspecified, all variables that follow after any end of follow-up (EFU) event are set to missing (NA). The
rndseed
Seed for the random number generator.

Value

  • A named list, each item is a data.frame corresponding to an action specified by the actions argument, action names are used for naming these list items.