Generate simulation data from simulation scenarios used in XYZ. The scenarios were derived so that the prognostic part of the model on control as an R^2 of 0.32 for continuous data and an AUC of 0.66 for binary data. The coefficient b0 was calculated in each scenario so that the overall test for a treatment effect has a power of 50 2.5 expressions for prognostic and predictive part) replicated across continuous and binary endpoints. Within each scenario there are 5 sub-scenarios corresponding to different selections of b1. The third scenario in each of the sub-scenarios correspond to the scenario where the interaction test (under the true model) has 80 (for 20 considered). The other 4 scenarios correspond to 0, 0.5, 1.5, 2 times the b1 value that provides 80 total there are hence 4x2x5=40 scenarios.

generate_scen_data(scen, include_truth = TRUE, type = c("sample", "resample"))

Arguments

scen

A row from the scen_param data set or scen_param_TTE data set for time-to-event data

include_truth

Boolean, will the true treatment effect be included in the outcome data-set?

type

For type == "sample" (default) X is generated using R package synthpop (using function generate_X_syn). For type == "resample" data are resampled from a large saved data-set generated from generate_X_syn (this option is considerably faster).

Value

A data frame

Examples

data(scen_param) ## scenarios used in XYZ
dat <- generate_scen_data(scen = scen_param[1, ])
#> Warning: In your synthesis there are numeric variables with 5 or fewer levels: X10.
#> Consider changing them to factors. You can do it using parameter 'minnumlevels'.