data(Paq1000)
d <- Paq1000
names(d) <- c("dementia","mort","entry","L","R","time","certif","death")
fit <- idm(formula02=Hist(time,event=mort,entry=entry)~certif,
formula01=Hist(time=list(L,R),event=dementia)~certif,data=d,hazard="Splines")
pred <- predict(fit,s=70,t=80,Z01=c(1),Z02=c(1),Z12=c(1))
Run the code above in your browser using DataLab