sim_func1.Rd
sim_func1 is a function that simulates a data structure with two baseline Gaussian covariates, a dichotomous exposure, and two Weibul distirbuted counterfactual outcomes, two censoring variables, and a competing event indicator. The simulation allows for confounding and dependent censoring through appropriate settings of parameters.
The prevalence of exposure
A parameter governing the strength of the confounder (W1)-treatement relation
Intercepts in the counterfactual models
Slopes in front of W1 and W2 common to both counterfactual models
Parameters in the censoring model.
The prevelence of the competing event.
The size of the simulated dataset
A random number seed.
A flag indicating whether counterfactuals should be included in output
A flag indicating whether a competing risk indicator should be included in output
A flag indicating whether a second censoring variable should be included in output
A data frame (tibble) containing the simulated data.