I have my data in long format correctly yet when I run the coxph function:
tryu <- coxph(Surv(entry,exit,dead==1) ~ age, na.action=na.omit,data=finalmerge)
I get the following error:
Warning message:
In Surv(entry, exit, dead == 1) :
Stop time must be > start time, NA created
But none of my exit times are larger than the entry times and none of them are missing? How can I get this to work??
Thanks