data(readmission)
## Gap-time ##
modJoint.gap <- frailtyPenal(Surv(time,event)~cluster(id)+sex+dukes+
charlson+terminal(death),formula.terminalEvent=~sex+dukes+charlson,
data=readmission,n.knots=14,kappa1=9.55e+9,kappa2=1.41e+12,
Frailty=TRUE,joint=TRUE)
# It takes around 1 minute to converge. #
plot(modJoint.gap,type.plot="haz",event="recurrent",conf.bands=TRUE)
plot(modJoint.gap,type.plot="haz",event="terminal",conf.bands=TRUE)
plot(modJoint.gap,type.plot="haz",event="both",conf.bands=TRUE))
plot(modJoint.gap,type.plot="su",event="recurrent",conf.bands=TRUE))
plot(modJoint.gap,type.plot="su",event="terminal",conf.bands=TRUE))
plot(modJoint.gap, event="terminal",type.plot="su",conf.bands=TRUE))
plot(modJoint.gap,type.plot="su","terminal",conf.bands=TRUE))
Run the code above in your browser using DataLab