########################################
#### epoce on a joint frailty model ####
########################################
data("readmission")
modJoint.gap <- frailtyPenal(Surv(t.start,t.stop,event)~ cluster(id) +
dukes + charlson + sex + chemo + terminal(death),
formula.terminalEvent = ~ dukes + charlson + sex + chemo ,
data = readmission, n.knots = 8, kappa =c(2.11e+08,9.53e+11),
recurrentAG=TRUE)
# computation on the same dataset
temps <- c(200,500,800,1100)
epoce <- epoce(modJoint.gap,temps)
print(epoce)
plot(epoce)
# computation on a new dataset, here a sample of readmission with the first 50 subjects
s <- readmission[1:100,]
epoce <- epoce(modJoint.gap,temps,newdata=s)
print(epoce)
plot(epoce)
Run the code above in your browser using DataLab