# calculate DCA with binary endpoint
dca(cancer ~ cancerpredmarker + marker,
data = df_binary,
as_probability = "marker",
label = list(cancerpredmarker = "Prediction Model", marker = "Biomarker")) %>%
# plot DCA curves with ggplot
plot(smooth = TRUE) +
# add ggplot formatting
ggplot2::labs(x = "Treatment Threshold Probability")
# calculate DCA with time to event endpoint
dca(Surv(ttcancer, cancer) ~ cancerpredmarker, data = df_surv, time = 1)
Run the code above in your browser using DataLab