Re: [R] cox goodness of fit

From: Roland Rau <>
Date: Thu, 31 May 2007 09:32:07 -0400


assuming you are doing a Cox-PH-Model, you can check: library(survival)

There it says that the components 'residuals' refers to the martingale residuals. I hope I recall it correctly but there exists a simple relation between the martingale residuals ('mgr') and the unmodified cox-snell residuals ('ucs'):
ucs = delta - mgr
where delta refers to your event indicator (0=censored, 1=event).

I don't have the books with me at the moment, but I think I learned about residuals in a survival context either in Klein/Moeschberger: Survival Analysis or in Tableman/Sung Kim: Survival Analysis Using S

I hope this helps,

Murray Pung wrote:
> Is there an implementation of the Cox-Snell residuals / Nelson-Aalen plot
> for goodness of fit?
> Or otherwise is there an appropriate Goodness of Fit diagnostic?
> Thanks
> Murray
> mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 31 May 2007 - 14:05:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 31 May 2007 - 14:31:24 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.