[R] survSplit
Thomas Lumley
tlumley at u.washington.edu
Mon Nov 8 16:28:17 CET 2004
On Mon, 8 Nov 2004, Danardono wrote:
> I am just realized that survival has the facility to do survival time
> splitting survSplit
> after read some postings about time dependency in the list.
> Is it survSplit only for the survival data input (time,status) and not for
> the 'counting process' input (start,stop,status)?
>
> I take one example modified from the survSplit help:
>> data(aml)
>> aml3<-survSplit(aml,cut=c(5,10,50),end="time",start="start",event="status",episode="i",id="id")
>
>> coxph(Surv(time,status)~x,data=aml)
>
> coef exp(coef) se(coef) z p
> xNonmaintained 0.916 2.5 0.512 1.79 0.074
>
> Likelihood ratio test=3.38 on 1 df, p=0.0658 n= 23
>
> #the same
>> coxph(Surv(time,status)~x,data=aml3)
>
> coef exp(coef) se(coef) z p
> xNonmaintained 0.916 2.5 0.512 1.79 0.074
>
> Likelihood ratio test=3.38 on 1 df, p=0.0658 n= 63
This should NOT be the same, and on my computer is not. You should have
to use the counting-process syntax. I get
> coxph(Surv(time,status)~x,data=aml3)
Call:
coxph(formula = Surv(time, status) ~ x, data = aml3)
coef exp(coef) se(coef) z p
xNonmaintained 1.07 2.92 0.514 2.08 0.037
Likelihood ratio test=4.61 on 1 df, p=0.0317 n= 63
> coxph(Surv(start,time,status)~x,data=aml3)
Call:
coxph(formula = Surv(start, time, status) ~ x, data = aml3)
coef exp(coef) se(coef) z p
xNonmaintained 0.916 2.5 0.512 1.79 0.074
Likelihood ratio test=3.38 on 1 df, p=0.0658 n= 63
> BUT If I split aml3 further:
>
>> aml4<-survSplit(aml3,cut=c(9,12,40),end="time",start="start",event="status",episode="i",id="id2")
> #not the same!
>> coxph(Surv(start,time,status)~x,data=aml4)
> coef exp(coef) se(coef) z p
> xNonmaintained 1.05 2.85 0.515 2.03 0.042
>
> Likelihood ratio test=4.38 on 1 df, p=0.0363 n= 105
>
Hmm. I suspect this is a <= vs < bug of some sort in handling start
times.
-thomas
More information about the R-help
mailing list