fitted: Extract Fitted Values for Joint Models

Description Usage Arguments Details Value Author(s) Examples

Description

fitted is a generic function which extracts fitted values from objects returned by jmodelTM() or jmodelMult().

Usage

1
2
3
4
5
6
## S3 method for class 'jmodelTM'
fitted(object, process = c("Longitudinal", "Survival"), 
        type = c("Marginal", "Conditional"), ...)
## S3 method for class 'jmodelMult'
fitted(object, process = c("Longitudinal", "Survival"), 
        type = c("Marginal", "Conditional"), ...)

Arguments

object

an object inheriting from class jmodelTM or jmodelMult.

process

for which process the fitted values are calculated, i.e. the longitudinal or the survival process.

type

what type of fitted values to calculate for each process. See Details.

...

additional arguments required. None is used in this method.

Details

We have implemented the fitted value calculation for process = "Longitudinal" but not for process = "Survival" yet as they are not well defined under the joint modeling setting. There are two types of fitted values depending on whether to compute the values conditional on the random effects. With type = "Marginal", the fitted values are \mathbf{X}_i^\top(t)\boldsymbolβ for objects returned by jmodelTM() and \mathbf{B}^\top(t)\boldsymbolγ for objects returned by jmodelMult(). With type = "Conditional", the fitted values are \mathbf{X}_i^\top(t)\boldsymbolβ + \mathbf{Z}_i^\top(t)\mathbf{b}_i for objects returned by jmodelTM() and b_i\times\mathbf{B}^\top(t)\boldsymbolγ for objects returned by jmodelMult().

Value

A numeric vector of fitted values.

Author(s)

Cong Xu helenxu1112@gmail.com

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
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')

# fitted values for the longitudinal process
fitted(fitJT.ph, type = "Conditional")

## End(Not run)

hadjipantelis/JSM documentation built on May 22, 2019, 4:40 p.m.