library(timereg)
data(TRACE)
lifetable(Surv(time,status==9)~sex+I(cut(wmi,c(-Inf,1,1.5,Inf))),
data=TRACE,breaks=c(0.2,0.5),confint=TRUE)
d <- with(TRACE,lifetable(Surv(time,status==9)~sex+vf,breaks=c(0.2,0.5)))
summary(glm(events ~ offset(log(atrisk))+interval*vf + sex*vf,
data=d,poisson))Run the code above in your browser using DataLab