Can someone explain to me why this error message keeps coming up? My previous time-to-event analyses have all worked perfectly with the same commands. Tank you.

My skript contains the following:

dfit <- survfit2(Surv(time, status) ~ intervention, data = Drugs_discon)

summary(dfit)

ggsurvfit(dfit)

Error in ggsurvfit(): ! ggsurvfit() cannot be used to plot objects of class <survfit2/survfitms/survfit>. ℹ Use ggcuminc() for competing risks cumulative incidence plotting. Run rlang::last_trace() to see where the error occurred.

0

There are 0 best solutions below