Extract Fitted Values for Joint Models
fitted
is a generic function which extracts fitted values from objects returned by jmodelTM()
or jmodelMult()
.
## 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"), ...)
object |
an object inheriting from class |
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. |
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()
.
A numeric vector of fitted values.
Cong Xu helenxu1112@gmail.com
## 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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.