I want to use the IDI.INF function from the survIDINRI package to compare the performance of two Cox regression models using a database of 15000 participants. I used this script:
D=subset(Dataset, select=c("time","status","Var1","Var2","Var3", "Var4", "Var5", "Var6", "Var7", "Var8", "Var9","Var10","Var11","Var12","Var13"))
D$status=as.numeric(D$status==2)
D=D[!is.na(apply(D,1,mean)),] ; dim(D)
Dataset=D[1:15930,]
outcome=D[,c(1,2)]
covs1<-as.matrix(D[,c(-1,-2)])
covs0<-as.matrix(D[,c(-1,-2,-13)])
t0=80
x <- IDI.INF(outcome, covs0, covs1, t0, npert=200)
At the end, I get the following error message:
Error in unoecdf(cc, pdiff[case], Wi[case] * PTB.Vi[case]) :
NA/NaN/Inf in foreign function call (arg 5)
Does anyone know what this error message entails? I've tried using different variables and reducing the number of variables I use, as well as changing the time t(0) amongst other things without success.