Learn R Programming

JSM (version 1.0.2)

ranef: Extract Random Effects for Joint Models

Description

ranef is a generic function which extracts random effects from objects returned by jmodelTM() or jmodelMult().

Usage

# S3 method for jmodelTM
ranef(object, ...)
# S3 method for jmodelMult
ranef(object, ...)

Value

A numeric matrix with rows denoting the subjects and columns the random effects.

Arguments

object

an object inheriting from class jmodelTM or jmodelMult.

...

additional arguments required. None is used in this method.

Author

Cong Xu helenxu1112@gmail.com

Examples

Run this code
if (FALSE) {
fitLME <- lme(proth ~ Trt * obstime, random = ~ 1 | ID, data = liver)
fitCOX <- coxph(Surv(start, stop, event) ~ Trt, data = liver, x = TRUE)
fitJT.ph <- jmodelTM(fitLME, fitCOX, liver, timeVarY = 'obstime')

# random effect for the joint model
ranef(fitJT.ph)
}

Run the code above in your browser using DataLab