Jim Trabas
2011-Sep-04 07:52 UTC
[R] How to understand the plotting of the cox.zph function
I have a coxph model which gives me HR of about 2.9 for presence of factor B (factors can be A, B, C, A as baseline in the model), with 95% CI 1.8-4.8 , p<0.001. When checking the proportionality assumption there is significant evidence that there is a violation On the link is the results of the plot(cox.zph) of the model for factor A. http://img31.imageshack.us/img31/7213/coxzph.jpg My question is how should I understand the smoothing line of the graph, and what is its relation (and the relation of the values on the y-axis) to the beta estimate the coxph function gives me (2.9 for the above example) IF there was no violation and the line of the cox.zph plot was straight, would the y-value of the line be (in this example) log(2.9)=1.06? If there is no violation of the proportionality assumption, does the "intercept" of the line equal the log of the HR that the coxph outputs? Or is the intercept the delta of the beta? Thank you very much JT -- View this message in context: http://r.789695.n4.nabble.com/How-to-understand-the-plotting-of-the-cox-zph-function-tp3788886p3788886.html Sent from the R help mailing list archive at Nabble.com.
Terry Therneau
2011-Sep-06 13:11 UTC
[R] How to understand the plotting of the cox.zph function
Under the assumption of PH, the graph would be a horizontal line at ylog(2.9) = coefficient of the model. That is, a constant hazard ratio. Your plot shows that there is no effect early (HR of 1) but there is an impact later. Terry T
Jim Trabas
2011-Sep-06 14:59 UTC
[R] How to understand the plotting of the cox.zph function
Thank you very much for your answer. I would like to construct for presentation purposes the HR(t), not the beta(t). How can I perform this? I obtained the x-y values of the cox.zph plot time= as.numeric(as.character(rownames(cox.zph.object$y))) HR=exp(cox.zph.object$y[,1]) However when I plot the plot(time, HR) and fit a lowess line (to time, HR), the HR seems to jump over proportionally high (higher that what the cox.zph plot suggests) Am I making any error in my thinking? Many thanks JT -- View this message in context: http://r.789695.n4.nabble.com/How-to-understand-the-plotting-of-the-cox-zph-function-tp3788886p3793651.html Sent from the R help mailing list archive at Nabble.com.
Jim Trabas
2011-Sep-15 07:33 UTC
[R] How to understand the plotting of the cox.zph function
Any insight maybe (sorry for the bump, need this info), JT. -- View this message in context: http://r.789695.n4.nabble.com/How-to-understand-the-plotting-of-the-cox-zph-function-tp3788886p3814881.html Sent from the R help mailing list archive at Nabble.com.