
Construct a simulation object for primary analysis
Source:R/simulation_class.R
setup_simulation_primary.RdConstruct a simulation object for primary analysis
Arguments
- data_matrix_list_null
List of data frames simulated under the null.
- trial_status_col_name
Name of the trial status column.
- treatment_col_name
Name of the treatment column.
- outcome_col_name
Character vector of outcome column names.
- covariates_col_name
Character vector of covariate column names.
- method_obj_list
List of method objects to evaluate.
- true_effect
Numeric vector of true treatment effects.
- method_description
Character vector of method labels, one per method in `method_obj_list`.
- data_matrix_list_alt
List of data frames simulated under the alternative.
- alt_effect
Numeric vector of alternative treatment effects.
- alpha
Significance level.
Examples
setup_simulation_primary(
data_matrix_list_null = list(SyntheticData),
trial_status_col_name = "S",
treatment_col_name = "A",
outcome_col_name = c("y1", "y2"),
covariates_col_name = c("x1", "x2", "x3", "x4", "x5"),
method_obj_list = list(setup_method_weighting(
method_name = "IPW",
optimal_weight_flag = TRUE,
model_form_piS = "S ~ x1 + x2 + x3 + x4 + x5"
)),
true_effect = c(0, 0),
method_description = "IPW"
)