This function simulates full data based on a list of intervention DAGs, returning a list of data.frame
s.
simfull(
actions,
n,
wide = TRUE,
LTCF = NULL,
rndseed = NULL,
rndseed.reset.node = NULL,
verbose = getOption("simcausal.verbose")
)
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.
Actions specifying the counterfactual DAG. This argument must be either an object of class DAG.action or a list of DAG.action objects.
Number of observations to sample.
A logical, if TRUE the output data is generated in wide format, if FALSE, the output longitudinal data in generated in long format
If forward imputation is desired for the missing variable values, this argument should be set to the name of the node that indicates the end of follow-up event. See the vignette, sim
and doLTCF
for additional details.
Seed for the random number generator.
When rndseed
is specified, use this argument to specify the name of the DAG
node at which the random number generator seed is reset back to NULL
(simulation function will call set.seed(NULL)
).
Can be useful if one wishes to simulate data using the set seed rndseed
only for the first K nodes of the DAG and use an entirely random sample when simulating the rest of the nodes starting at K+1 and on.
The name of such (K+1)th order DAG
node should be then specified with this argument.
Set to TRUE
to print messages on status and information to the console.
Turn this off by default using options(simcausal.verbose=FALSE).
simobs
- a wrapper function for simulating observed data only; sim
- a wrapper function for simulating both types of data; doLTCF
for forward imputation of the missing values in already simulating data; DF.to.long
, DF.to.longDT
- converting longitudinal data from wide to long formats.
Other simulation functions:
sim()
,
simobs()