Closed smouksassi closed 3 years ago
from the book:
pbc <- pbc2[c("id", "serBilir", "drug", "year", "years", "status2", "spiders")] pbc$start <- pbc$year splitID <- split(pbc[c("start", "years")], pbc$id) pbc$stop <- unlist(lapply(splitID, function (d) c(d$start[-1], d$years[1]) )) pbc$event <- with(pbc, ave(status2, id, FUN = function (x) c(rep(0, length(x)-1), x[1]) )) tdCox.pbc <- coxph(Surv(start, stop, event) ~ drug * spiders + cluster(id), data = pbc, x = TRUE, model = TRUE) jointFit8.pbc <- jointModel(lmeFit.pbc, tdCox.pbc, timeVar = "year", method = "spline-PH-aGH") Error in jointModel(lmeFit.pbc, tdCox.pbc, timeVar = "year", method = "spline-PH-aGH") : use argument 'model = TRUE' and cluster() in coxph().
the code test for the cluster slot but it is now (cluster)
Is resolved on GitHub now.
thanks you !
from the book:
the code test for the cluster slot but it is now (cluster)