# \donttest{
gam_re = frailtyMM(Surv(tstart, tstop, status) ~ sex + treat + cluster(id), cgd, frailty = "gamma")
# Plot the survival curve based on baseline hazard
plot(gam_re, surv = TRUE)
# Construct new data and plot the cumulative hazard based on new data
newre = c(1, 1, 2)
names(newre) = c(gam_re$coefname, "id")
plot(gam_re, newdata = newre)
# }
Run the code above in your browser using DataLab