data(dataJoint)
modJoint<-frailtyPenal(Surv(time.entry,time.end,status)~cluster(id)+var1+var2
+terminal(status.terminal),
formula.terminalEvent=~var1,
data=dataJoint,n.knots=7,
kappa1=1, kappa2=1,Frailty=TRUE, joint=TRUE, recurrentAG=TRUE)
# It takes around 1 minute to converge. #
plot(modJoint,type.plot="haz",event="recurrent",conf.bands=TRUE)
plot(modJoint,type.plot="haz",event="terminal",conf.bands=TRUE)
plot(modJoint,type.plot="haz",event="both",conf.bands=TRUE))
plot(modJoint,type.plot="su",event="recurrent",conf.bands=TRUE))
plot(modJoint,type.plot="su",event="terminal",conf.bands=TRUE))
plot(modJoint, event="terminal",type.plot="su",conf.bands=TRUE))
plot(modJoint,type.plot="su","terminal",conf.bands=TRUE))Run the code above in your browser using DataLab