if (FALSE) {
require(ggplot2)
data(heart.valve)
hvd <- heart.valve[!is.na(heart.valve$log.grad) & !is.na(heart.valve$log.lvmi), ]
set.seed(1)
fit1 <- mjoint(formLongFixed = log.lvmi ~ time,
formLongRandom = ~ time | num,
formSurv = Surv(fuyrs, status) ~ 1,
data = hvd,
timeVar = "time")
plot(ranef(fit1, postVar = TRUE))
}
Run the code above in your browser using DataLab