Re: [R] conflicting results for a time-varying coefficient in a Cox model

2019-08-18 Thread Ferenci Tamas
Dear Dr. Therneau, Thank you very much for your exhaustive answer! I now see the issue. Perhaps even more important was your confirmation that my approach with karno:ns(time, df=4) is theoretically correct. (I knew that plot.cox.zph is sound, so I was afraid that the difference can be attribute

Re: [R] conflicting results for a time-varying coefficient in a Cox model

2019-08-08 Thread Therneau, Terry M., Ph.D. via R-help
This is an excellent question. The answer, in this particular case, mostly has to do with the outlier time values.  (I've never been convinced that the death at time 999 isn't really a misplaced code for "missing", actually).    If you change the knots used by the spline you can get quite dif

[R] conflicting results for a time-varying coefficient in a Cox model

2019-08-06 Thread Ferenci Tamas
Dear All, I was thinking of two possible ways to plot a time-varying coefficient in a Cox model. One is simply to use survival::plot.cox.zph which directly produces a beta(t) vs t diagram. The other is to transform the dataset to counting process format and manually include an interaction with t