# \donttest{
# Count outcome
cv_count <- catecv(response = "count",
data = countExample,
score.method = "poisson",
cate.model = y ~ age + female + previous_treatment +
previous_cost + previous_number_relapses +
offset(log(years)),
ps.model = trt ~ age + previous_treatment,
higher.y = FALSE, cv.n = 5, verbose = 1)
# ABC of the validation curves for each method and each CV iteration
abc(cv_count)
# Survival outcome
library(survival)
cv_surv <- catecv(response = "survival",
data = survivalExample,
score.method = c("poisson", "randomForest"),
cate.model = Surv(y, d) ~ age + female + previous_cost +
previous_number_relapses,
ps.model = trt ~ age + previous_treatment,
higher.y = FALSE,
cv.n = 5)
# ABC of the validation curves for each method and each CV iteration
abc(cv_surv)
# }
Run the code above in your browser using DataLab