1

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:

r1

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:

sas1

How can I check the PH assumption like I do with SAS? How can I introduce simulated paths?

Thank you all!!

Community
  • 1
  • 1
ArTu
  • 431
  • 4
  • 20
  • `survival::cox.zph()` will test the PH assumption for each variable in your model and the overall fit as well. I would check the `survival` documentation for additional info – Mike May 18 '18 at 17:36
  • I am not sure about the simulated paths. – Mike May 18 '18 at 17:36
  • Thank you @Mike !! This works also with competing risks? – ArTu May 18 '18 at 17:48
  • good question, not sure I would check out this reference to see if they discuss competing risks at all: P. Grambsch and T. Therneau (1994), Proportional hazards tests and diagnostics based on weighted residuals. Biometrika, 81, 515-26 – Mike May 18 '18 at 17:58
  • Looking around the net it doesn’t seem so..I’ve found the code I used in Regression modeling of competing risk using R: an in depth guide for clinicians, Scrucca, Santucci, Aversa, Bone marrow transplantation 45, 1388-1395 (2010). The code and the plots are at page 1392-1393 but I don’t obtain a plot like those shown, I don’t know why.. they assess the proportional hazard subdistribution assumption. – ArTu May 18 '18 at 20:05
  • It might be old code. But if you want to plot time by residuals like they did here is some modified plot code `plot(fg$uftime, fg$res, main = names(fg$coef), xlab = "Failure time", ylab = "Schoenfeld residuals" ) lines(fg$uftime,fg$res)` – Mike May 22 '18 at 21:00
  • Thank you Mike! This plot is better for sure! I'm still lookin around for a way to get a p-value that checks the ph.. is it possible there is not a way? – ArTu May 25 '18 at 19:08
  • it is possible but to get better statistics help there is a site called cross validated where this question would be better suited. – Mike May 29 '18 at 13:47

0 Answers0