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
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
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
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
4 matches
Mail list logo