[R] frailty model for gap times

Thomas Lumley tlumley at u.washington.edu
Wed Nov 10 01:22:11 CET 2004


On Tue, 9 Nov 2004, Lei Liu wrote:

> Hi there,
>
> I have a question on the frailty model for gap times with distinct baseline 
> hazard for each gap. Can I use R coxph function to do it? For example, the 
> following code assumes an identical baseline hazard for every gap time, but 
> what if I want a distinct baseline hazard for each gap?
>
> coxph(Surv(gap,status)~trt+frailty(id))
>

You need a stratified model, eg if gapnumber is 1,2,3,4,.. within each 
person
coxph(Surv(gap,status)~trt+frailty(id)+strata(gapnumber))

 	-thomas




More information about the R-help mailing list