[R] coxph diagnostics

John Sorkin jsorkin at grecc.umaryland.edu
Thu Aug 15 22:51:54 CEST 2013


Dr. Therneau,
Thank you as always for first writing, and second continuing the Cox model in R (and earlier I believe in SAS).
 
While your comments concerning non-proportional hazards is helpful, it does not fully address the question, "What alternatives do I have if I assume proportional assumption of coxph does not hold?" The traditional answer would be, I believe, to define strata of a non proportional independent variable so that within strata the hazards are proportional, and then run the analyses accounting for the strata. While this will deal with a variable entered as a "nuisance" parameter, i.e. one that one wants to adjust for, but one that one is not interested in drawing inferences about, it does not solve the problem if the non-proportional covariate is one about which one wishes to make inferences as one does not get an estimate for a parameter used to define strata. Could you give some guidance about ways to deal with a non-proportional independent variable about which one does wish to make inferences?
Thank you,
John   


John David Sorkin M.D., Ph.D.
Professor of Medicine
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing) 
>>> Terry Therneau <therneau at mayo.edu> 08/13/13 9:14 AM >>>
That's the primary reason for the plot: so that you can look and think.

The test statistic is based on whether a LS line fit to the plot has zero slope. For 
larger data sets you can sometimes have a "significant" p-value but good agreement with 
proportional hazards. It's much like an example from Lincoln Moses' begining statistics 
book (now out of print, so rephrasing from memory).
 "Suppose that you flip a coin 10,000 times and get 5101 heads. What can you say?
 a. The coin is not perfectly fair (p<.05). b. But it is darn close to perfect! "
As a referee I would be comfortable using that coin to start a football game.

The Cox model gives an average hazard ratio, averaged over time. When proportional 
hazards holds that value is a complete summary-- nothing else is needed. When it does 
not hold, the average may still be useful, or not, depending on the degree of change over 
time.

Terry Therneau



On 08/13/2013 05:00 AM, r-help-request at r-project.org wrote:
> Thanks to Bert and G?ran for your responses.
>
> To answer G?ran's comment, yes I did plot the Schoenfeld residuals using
> plot.cox.zph and the lines look horizontal (slope = 0) to me, which makes
> me think that it contradicts the results of cox.zph.
>
> What alternatives do I have if I assume proportional assumption of coxph
> does not hold?
>
> Thanks!

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Confidentiality Statement:
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information.  Any unauthorized use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. 


More information about the R-help mailing list