I am using package survivalROC to plot roc curv. But when I calculate true-positive and false-positive with function survivalROC, I get an error ,
Here are my analyzing code:
survivalROC(Stime = HR_ICGC_e_sample$time, status = HR_ICGC_e_sample$status, marker = HR_ICGC_e_sample$HR, predict.time = 12, span = 0.25*nobs_icgc^(-0.20))
and the reported error:
Error in if (n > 0) s0 <- s0 * (1 - d/n) : missing value where TRUE/FALSE needed
Another, the same codes run well for any other groups of data. And I have checked, there aren't any NAs in this analysised data
HR_ICGC_e_sample . I didn't find anything useful information aim to this error about survivalROC. Maybe there are somebody could help me? Any information would be appreciated.
Thanks in advance!