I've obtained Schoenfeld residuals for testing PH for Fine & Gray's Cox regression model in presence of competing events with cmprsk.
Here's the code:
fg<-crr( fu_m, event, diabetes, failcode=1, cencode=0,
na.action=na.omit, gtol=1e-06, maxiter=10, variance=TRUE)
fg$res
fg$uft
par(mfrow = c(1,1), mar = c(4.5,4,2,1))
for(j in 1:ncol(fg$res))
fg$u
scatter.smooth(fg$uftime, fg$res[,j],
main = names(fg$diabetes)[j],
xlab = "Failure time",
ylab = "Schoenfeld residuals")
Here's the output:
> fg$res
[,1]
[1,] 0.5498603
[2,] -0.3957394
[3,] -0.4024953
[4,] 0.5905142
[5,] -0.3421397
> fg$uft
[1] 4.238193 6.275154 16.131417 27.498973 46.817248
Here's the plot:
I've done the same using SAS and I've obtained a p-value of 0,55 on 1000 simulated paths and this plot for observed path and first 20 simulated paths:
How can I check the PH assumption like I do with SAS? How can I introduce simulated paths?
Thank you all!!