if (FALSE) {
# linear mixed model fit
fitLME <- lme(sqrt(CD4) ~ obstime * drug - drug,
random = ~ 1 | patient, data = aids)
# cox model fit
fitCOX <- coxph(Surv(Time, death) ~ drug, data = aids.id, x = TRUE)
# joint model fit
fitJOINT <- jointModel(fitLME, fitCOX,
timeVar = "obstime")
# fixed effects for the longitudinal process
fixef(fitJOINT)
# fixed effects + random effects estimates for the longitudinal
# process
coef(fitJOINT)
# fixed effects for the event process
fixef(fitJOINT, process = "Event")
coef(fitJOINT, process = "Event")
}
Run the code above in your browser using DataLab