Re: [R] results of a survival analysis change when converting the data to counting process format

2019-08-23 Thread Ferenci Tamas
en focusing on that one: one of the two splits led to an exp() overflow and one didn't, giving results that were completely different. This led to a more careful review and some changes that addressed the example below as well. Terry T. On 8/23/19 5:00 AM, r-help-requ...@r-project.org wrot

[R] results of a survival analysis change when converting the data to counting process format

2019-08-18 Thread Ferenci Tamas
Dear All, Consider the following simple example: library( survival ) data( veteran ) coef( coxph(Surv(time, status) ~ trt + prior + karno, data = veteran) ) trtpriorkarno 0.180197194 -0.005550919 -0.033771018 Note that we have neither time-dependent covariates, nor ti

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

2019-08-18 Thread Ferenci Tamas
data=veteran2) ncall3 <- attr(terms(fit3), "predvars")[[6]] ty3 <- eval(ncall3, data.frame(stime= sqrt(tx))) %*% coef(fit3)[4:7] + coef(fit3)[3] lines(sqrt(tx), ty3, col=2) The right tail is now better behaved. Eliminating the points >900 makes things even

[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