if (FALSE) {
prothro$t0 <- as.numeric(prothro$time == 0)
lmeFit <- lme(pro ~ treat * (time + t0), random = ~ time | id, data = prothro)
survFit <- coxph(Surv(Time, death) ~ treat, data = prothros, x = TRUE)
jointFit <- jointModel(lmeFit, survFit, timeVar = "time",
method = "weibull-PH-aGH")
newData <- simulate(jointFit, nsim = 1, times = seq(0, 11, len = 15))
newData
}
Run the code above in your browser using DataLab