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