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)) Thanks in advance! Lei Liu Assistant Professor Division of Biostatistics and Epidemiology Dept. of Health Evaluation Sciences School of Medicine University of Virginia 3181 Hospital West Complex Charlottesville, VA 22908-0717 1-434-982-3364 (o) 1-734-730-1395 (c) liulei at virginia.edu ll9f at virginia.edu
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