# NOT RUN {
fitLME <- lme(proth ~ Trt * obstime, random = ~ 1 | ID, data = liver)
fitCOX <- coxph(Surv(start, stop, event) ~ Trt, data = liver, x = TRUE)
fitJT.ph <- jmodelTM(fitLME, fitCOX, liver, timeVarY = 'obstime')
# residuals for the longitudinal process
residuals(fitJT.ph, type = "Standardized-Conditional")
# }
Run the code above in your browser using DataLab