ranef: Random Effects Estimates for Joint Models

Description Usage Arguments Value Author(s) References See Also Examples

Description

Extracts the random effects estimates from a fitted joint model.

Usage

1
2
## S3 method for class 'JMbayes'
ranef(object, postVar = FALSE, ...)

Arguments

object

an object inheriting from class JMbayes.

postVar

logical; if TRUE the variance of the posterior distribution is also returned.

...

additional arguments; currently none is used.

Value

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".

Author(s)

Dimitris Rizopoulos d.rizopoulos@erasmusmc.nl

References

Rizopoulos, D. (2012) Joint Models for Longitudinal and Time-to-Event Data: with Applications in R. Boca Raton: Chapman and Hall/CRC.

See Also

coef.JMbayes, jointModelBayes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# linear mixed model fit
fitLME <- lme(log(serBilir) ~ drug * year, random = ~ 1 | id, data = pbc2)
# survival regression fit
fitSURV <- coxph(Surv(years, status2) ~ drug, data = pbc2.id, x = TRUE)

# joint model fit, under the (default) Weibull model
fitJOINT <- jointModelBayes(fitLME, fitSURV, timeVar = "year")
ranef(fitJOINT)

## End(Not run)

JMbayes documentation built on Jan. 9, 2020, 9:07 a.m.