data <- gfoRmulaICE::compData
ice_fit1 <- ice(
data = data,
time_points = 4,
id = "id",
time_name = "t0",
censor_name = "C",
outcome_name = "Y",
compevent_name = "D",
comp_effect = 0,
outcome_model = Y ~ L1 + L2 + A1 + A2,
censor_model = C ~ L1 + L2 + A1 + A2,
ref_idx = 0,
estimator = pool(hazard = FALSE),
int_descript = "Static Intervention",
intervention1.A1 = list(static(3)),
intervention1.A2 = list(static(1))
)
ice_fit2 <- ice(
data = data,
time_points = 4,
id = "id",
time_name = "t0",
censor_name = "C",
outcome_name = "Y",
compevent_name = "D",
comp_effect = 0,
outcome_model = Y ~ L1 + L2 + A1 + A2,
censor_model = C ~ L1 + L2 + A1 + A2,
competing_model = D ~ L1 + L2 + A1 + A2,
ref_idx = 0,
estimator = pool(hazard = TRUE),
int_descript = "Static Intervention",
intervention1.A1 = list(static(3)),
intervention1.A2 = list(static(1))
)
plot(ice_fit1, ice_fit2)
Run the code above in your browser using DataLab