ranef {JM} | R Documentation |
Extracts the random effects estimates from a fitted joint model.
## S3 method for class 'jointModel': ranef(object, postVar = FALSE, ...)
object |
an object inheriting from class jointModel . |
postVar |
logical; if TRUE the variance-covariance matrix of these estimates is also returned.
See Details for more info. |
... |
additional arguments; currently none is used. |
For methods "ch-GH"
, "weibull-GH"
, "ph-GH"
the ranef()
method returns the
posterior means (and posterior variances if postVar = TRUE
), whereas for method "ch-Laplace"
it returns the
posterior modes (and the inverse of the negative of the second-order derivative of the log-posterior with respect to the
random effects, if postVar = TRUE
).
a numeric matrix with rows denoting the individuals and columns the random effects (e.g., intercepts, slopes, etc.).
If postVar = TRUE
, the numeric matrix has an extra attribute ``postVar".
Dimitris Rizopoulos d.rizopoulos@erasmusmc.nl
coef.jointModel
, fixef.jointModel
# linear mixed model fit fitLME <- lme(log(serBilir) ~ drug * year, random = ~ 1 | id, data = pbc2) # survival regression fit fitSURV <- survreg(Surv(years, status2) ~ drug, data = pbc2.id, x = TRUE) # joint model fit, under the (default) Weibull model fitJOINT <- jointModel(fitLME, fitSURV, timeVar = "year") ranef(fitJOINT)