set.seed(10)
d <- SimCompRisk(2e1)
d$time <- round(d$time,1)
ttt <- unique(sort(d$time))#sort(sample(x = unique(sort(d$time)), size = 10))
#### coxph function
CSC.fit <- CSC(Hist(time,event)~ X1+X2,data=d, method = "breslow")
predCSC <- predict(CSC.fit, newdata = d[1,,drop=FALSE], cause = 2, times = ttt, se = TRUE)
Run the code above in your browser using DataLab