Open ghost opened 3 years ago
I'm looking into this, and appears that survfit is the culprit. Notice that the two outputs below are different:
summary(survfit(Surv(time, status) ~ 1, data=lung), times=c(365,720,1095))$table
summary(survfit(Surv(time, Status) ~ 1, data=lung), times=c(365,720,1095))$table
etsum relies on summary.survfit to obtain some values. So, until I dig further into this, I'm throwing an error in etsum if the second entry is a factor. Not closing this issue just yet.
This works:
etsum(data = lung, response = c("time","status"), group = 1, times=c(365,720,1095))
But this doesn’t:
lung$Status = factor(lung$status-1) etsum(data = lung, response = c("time","Status"), group = 1, times=c(365,720,1095))