Hi R is able to produce scaled schoenfeld residuals with confidence bands
I've figured out how to produce and graph the residuals , see below.
However, does anyone know how to get the confidence intervals? - this is possible in the R package:
see pic:

https://hbiostat.org/rmsc/cox#sec-cox-ph
I've figured out how to produce and graph the residuals , see below.
However, does anyone know how to get the confidence intervals? - this is possible in the R package:
see pic:
https://hbiostat.org/rmsc/cox#sec-cox-ph
Code:
stcox var1 var2 var3 gen insample=e(sample) drop if insample2==0 //drops those not used in sample to assess PH estat phtest, detail predict sch*, scaledsch scatter sch1 _t || lfit sch1 _t