I'm trying to compute a log-rank test that would compare the Kaplan-Meier and the Nelson-Aalen curves. I have the following formulas:
f1_km <- survfit(Surv(futime, fustat) ~ 1, data = data_surv) #Kaplan-Meier
f2_na <- survfit(Surv(futime, fustat) ~ 1, stype=2, ctype=1, data = data_surv) #Nelson-Aalen
My issue is that I need to compute a survdiff formula but now I have two separate datasets. My data is not grouped, in other words there is no stratifying variable but two separate results.
How can I combine the two survival resulting datasets in order to compute a survdiff formula? Thank you for your help.