# Weibull illness deaths model
data(Dem15_h_3)
d <- Dem15_h_3
names(d) <- c("dementia","mort","entry","L","R","time","cep")
fit.weib <- idm(formula02=Hist(time,event=mort,entry=entry)~cep,
formula01=Hist(time=list(L,R),event=dementia)~cep,data=d)
# no confidence bands
plot(fit.weib)
# confidence bands for transition 0 --> 1
plot(fit.weib,conf.bands=TRUE,transition="01")
Run the code above in your browser using DataLab