Fitting Joint Models in R using Packages JM and JMbayes
Dimitris Rizopoulos
Department of Biostatistics, Erasmus Medical Center, the Netherlands
d.rizopoulos@erasmusmc.nl
Joint Statistical Meetings
August 11th, 2015
1.1 Introduction
• Often in follow-up studies different types of outcomes are collected
• Explicit outcomes
◃ multiple longitudinal responses (e.g., markers, blood values)
◃ time-to-event(s) of particular interest (e.g., death, relapse)
• Implicit outcomes
◃ missing data (e.g., dropout, intermittent missingness)
◃ random visit times
JM & JMbayes – August 11, 2015 1/37
1.2 Illustrative Case Study
• Aortic Valve study: Patients who received a human tissue valve in the aortic position
◃ data collected by Erasmus MC (from 1987 to 2008);
77 received sub-coronary implantation; 209 received root replacement
• Outcomes of interest:
◃ death and re-operation → composite event
◃ aortic gradient
JM & JMbayes – August 11, 2015 2/37
1.3 Research Questions
• Depending on the questions of interest, different types of statistical analysis are
required
• We will distinguish between two general types of analysis
◃ separate analysis per outcome
◃ joint analysis of outcomes
• Focus on each outcome separately
◃ does treatment affect survival?
◃ are the average longitudinal evolutions different between males and females?
◃ . . .
JM & JMbayes – August 11, 2015 3/37
1.3 Research Questions (cont’d)
• Focus on multiple outcomes
◃ Complex effect estimation: how strong is the association between the longitudinal
outcome and the hazard rate of death?
◃ Handling implicit outcomes: focus on the longitudinal outcome but with dropout
JM & JMbayes – August 11, 2015 4/37
1.3 Research Questions (cont’d)
In the Aortic Valve dataset:
• Research Question:
◃ Can we utilize available aortic gradient measurements to predict
survival/re-operation
JM & JMbayes – August 11, 2015 5/37
1.4 Goals
• Methods for the separate analysis of such outcomes are well established in the
literature
• Survival data:
◃ Cox model, accelerated failure time models, . . .
• Longitudinal data
◃ mixed effects models, GEE, marginal models, . . .
JM & JMbayes – August 11, 2015 6/37
1.4 Goals (cont’d)
• Goals of this talk:
◃ introduce joint models
◃ illustrate present software capabilities in R
JM & JMbayes – August 11, 2015 7/37
2.1 Joint Modeling Framework
• To answer our questions of interest we need to postulate a model that relates
◃ the aortic gradient with
◃ the time to death or re-operation
• Problem: Aortic gradient is an endogenous time-dependent covariate (Kalbfleisch and
Prentice, 2002, Section 6.3)
◃ Measurements on the same patient are correlated
◃ Endogenous (aka internal): the future path of the covariate up to any time t > s
IS affected by the occurrence of an event at time point s
JM & JMbayes – August 11, 2015 8/37
2.1 Joint Modeling Framework (cont’d)
• What is special about endogenous time-dependent covariates
◃ measured with error
◃ the complete history is not available
◃ existence directly related to failure status
• What if we use the Cox model?
◃ the association size can be severely underestimated
◃ true potential of the marker will be masked
JM & JMbayes – August 11, 2015 9/37
2.1 Joint Modeling Framework (cont’d)
0 1 2 3 4 5
46810
Time (years)
AoGrad
Death
observed Aortic Gradient
time−dependent Cox
JM & JMbayes – August 11, 2015 10/37
2.1 Joint Modeling Framework (cont’d)
• To account for the special features of these covariates a new class of models has been
developed
Joint Models for Longitudinal and Time-to-Event Data
• Intuitive idea behind these models
1. use an appropriate model to describe the evolution of the marker in time for each
patient
2. the estimated evolutions are then used in a Cox model
• Feature: Marker level is not assumed constant between visits
JM & JMbayes – August 11, 2015 11/37
2.1 Joint Modeling Framework (cont’d)
Time
0.10.20.30.4
hazard
0.00.51.01.52.0
0 2 4 6 8
marker
JM & JMbayes – August 11, 2015 12/37
2.1 Joint Modeling Framework (cont’d)
• We define a standard joint model
◃ Survival Part: Relative risk model
hi(t) = h0(t) exp{γ⊤
wi + αmi(t)},
where
* mi(t) = the true & unobserved value of aortic gradient at time t
* α quantifies the effect of aortic gradient on the risk for death/re-operation
* wi baseline covariates
JM & JMbayes – August 11, 2015 13/37
2.1 Joint Modeling Framework (cont’d)
◃ Longitudinal Part: Reconstruct Mi(t) = {mi(s), 0 ≤ s < t} using yi(t) and a
mixed effects model (we focus on continuous markers)
yi(t) = mi(t) + εi(t)
= x⊤
i (t)β + z⊤
i (t)bi + εi(t), εi(t) ∼ N(0, σ2
),
where
* xi(t) and β: Fixed-effects part
* zi(t) and bi: Random-effects part, bi ∼ N(0, D)
JM & JMbayes – August 11, 2015 14/37
3.1 Joint Models in R
• Joint models are fitted using function jointModel() from package JM. This
function accepts as main arguments a linear mixed model and a Cox PH model based
on which it fits the corresponding joint model
lmeFit <- lme(CD4 ~ obstime + obstime:drug,
random = ~ obstime | patient, data = aids)
coxFit <- coxph(Surv(Time, death) ~ drug, data = aids.id, x = TRUE)
jointFit <- jointModel(lmeFit, coxFit, timeVar = "obstime",
method = "piecewise-PH-aGH")
summary(jointFit)
JM & JMbayes – August 11, 2015 15/37
3.1 Joint Models in R
• As before, the data frame given in lme() should be in the long format, while the
data frame given to coxph() should have one line per subject∗
◃ the ordering of the subjects needs to be the same
• In the call to coxph() you need to set x = TRUE (or model = TRUE) such that the
design matrix used in the Cox model is returned in the object fit
• Argument timeVar specifies the time variable in the linear mixed model
∗
Unless you want to include exogenous time-varying covariates or handle competing risks
JM & JMbayes – August 11, 2015 16/37
3.1 Joint Models in R
• Argument method specifies the type of relative risk model and the type of numerical
integration algorithm – the syntax is as follows:
<baseline hazard>-<parameterization>-<numerical integration>
Available options are:
◃ "piecewise-PH-GH": PH model with piecewise-constant baseline hazard
◃ "spline-PH-GH": PH model with B-spline-approximated log baseline hazard
◃ "weibull-PH-GH": PH model with Weibull baseline hazard
◃ "weibull-AFT-GH": AFT model with Weibull baseline hazard
◃ "Cox-PH-GH": PH model with unspecified baseline hazard
GH stands for standard Gauss-Hermite; using aGH invokes the pseudo-adaptive
Gauss-Hermite rule
JM & JMbayes – August 11, 2015 17/37
3.1 Joint Models in R
• Joint models under the Bayesian approach are fitted using function
jointModelBayes() from package JMbayes. This function works in a very similar
manner as function jointModel(), e.g.,
lmeFit <- lme(CD4 ~ obstime + obstime:drug,
random = ~ obstime | patient, data = aids)
coxFit <- coxph(Surv(Time, death) ~ drug, data = aids.id, x = TRUE)
jointFitBayes <- jointModelBayes(lmeFit, coxFit, timeVar = "obstime")
summary(jointFitBayes)
JM & JMbayes – August 11, 2015 18/37
3.1 Joint Models in R
• JMbayes is more flexible (in some respects):
◃ directly implements the MCMC
◃ allows for categorical longitudinal data as well
◃ allows for general transformation functions
◃ penalized B-splines for the baseline hazard function
◃ . . .
JM & JMbayes – August 11, 2015 19/37
3.1 Joint Models in R
• In both packages methods are available for the majority of the standard generic
functions + extras
◃ summary(), anova(), vcov(), logLik()
◃ coef(), fixef(), ranef()
◃ fitted(), residuals()
◃ plot()
◃ xtable() (you need to load package xtable first)
JM & JMbayes – August 11, 2015 20/37
4.1 Association Structures
• The standard assumption is



hi(t | Mi(t)) = h0(t) exp{γ⊤
wi + αmi(t)},
yi(t) = mi(t) + εi(t)
= x⊤
i (t)β + z⊤
i (t)bi + εi(t),
where Mi(t) = {mi(s), 0 ≤ s < t}
JM & JMbayes – August 11, 2015 21/37
4.1 Association structures (cont’d)
Time
0.10.20.30.4
hazard
0.00.51.01.52.0
0 2 4 6 8
marker
JM & JMbayes – August 11, 2015 22/37
4.1 Association Structures (cont’d)
• The standard assumption is



hi(t | Mi(t)) = h0(t) exp{γ⊤
wi + αmi(t)},
yi(t) = mi(t) + εi(t)
= x⊤
i (t)β + z⊤
i (t)bi + εi(t),
where Mi(t) = {mi(s), 0 ≤ s < t}
Is this the only option? Is this the most optimal for
prediction?
JM & JMbayes – August 11, 2015 23/37
4.2 Time-dependent Slopes
• The hazard for an event at t is associated with both the current value and the slope
of the trajectory at t (Ye et al., 2008, Biometrics):
hi(t | Mi(t)) = h0(t) exp{γ⊤
wi + α1mi(t) + α2m′
i(t)},
where
m′
i(t) =
d
dt
{x⊤
i (t)β + z⊤
i (t)bi}
JM & JMbayes – August 11, 2015 24/37
4.2 Time-dependent Slopes (cont’d)
Time
0.10.20.30.4
hazard
0.00.51.01.52.0
0 2 4 6 8
marker
JM & JMbayes – August 11, 2015 25/37
4.3 Cumulative Effects
• The hazard for an event at t is associated with area under the trajectory up to t:
hi(t | Mi(t)) = h0(t) exp
{
γ⊤
wi + α
∫ t
0
mi(s) ds
}
• Area under the longitudinal trajectory taken as a summary of Mi(t)
JM & JMbayes – August 11, 2015 26/37
4.3 Cumulative Effects (cont’d)
Time
0.10.20.30.4
hazard
0.00.51.01.52.0
0 2 4 6 8
marker
JM & JMbayes – August 11, 2015 27/37
4.4 Weighted Cumulative Effects
• The hazard for an event at t is associated with the area under the weighted trajectory
up to t:
hi(t | Mi(t)) = h0(t) exp
{
γ⊤
wi + α
∫ t
0
ϖ(t − s)mi(s) ds
}
,
where ϖ(·) appropriately chosen weight function, e.g.,
◃ Gaussian density
◃ Student’s-t density
◃ . . .
JM & JMbayes – August 11, 2015 28/37
4.5 Association Structures in JM & JMbayes
• Both package give options to define the aforementioned association structures
◃ in JM via arguments parameterization & derivForm
◃ in JMbayes via arguments param & extraForm
• JMbayes also gives the option for general transformation functions, e.g.,
hi(t | Mi(t)) = h0(t) exp{γ⊤
wi + α1mi(t) + α2mi(t) × Treati +
α3m′
i(t) + α3(m′
i(t))2
},
JM & JMbayes – August 11, 2015 29/37
5.1 Predictions – Definitions
• We are interested in predicting survival probabilities for a new patient j that has
provided a set of aortic gradient measurements up to a specific time point t
• Example: We consider Patients 20 and 81 from the Aortic Valve dataset
JM & JMbayes – August 11, 2015 30/37
5.1 Predictions – Definitions (cont’d)
Follow−up Time (years)
AorticGradient(mmHg)
0
2
4
6
8
10
0 5 10
Patient 20
0 5 10
Patient 81
JM & JMbayes – August 11, 2015 31/37
5.1 Predictions – Definitions (cont’d)
Follow−up Time (years)
AorticGradient(mmHg)
0
2
4
6
8
10
2 4 6 8 10 12
Patient 20
2 4 6 8 10 12
Patient 81
JM & JMbayes – August 11, 2015 31/37
5.1 Predictions – Definitions (cont’d)
Follow−up Time (years)
AorticGradient(mmHg)
0
2
4
6
8
10
2 4 6 8 10 12
Patient 20
2 4 6 8 10 12
Patient 81
JM & JMbayes – August 11, 2015 31/37
5.1 Predictions – Definitions (cont’d)
• What do we know for these patients?
◃ a series of aortic gradient measurements
◃ patient are event-free up to the last measurement
• Dynamic Prediction survival probabilities are dynamically updated as additional
longitudinal information is recorded
JM & JMbayes – August 11, 2015 32/37
5.2 Predictions – JM & JMbayes
• Individualized predictions of survival probabilities are computed by function
survfitJM() – for example, for Patient 2 from the PBC dataset we have
sfit <- survfitJM(jointFit, newdata = pbc2[pbc2$id == "2", ])
sfit
plot(sfit)
plot(sfit, include.y = TRUE)
JM & JMbayes – August 11, 2015 33/37
5.3 Dyn. Predictions – Illustration
Follow−up Time (years)
AorticGradient(mmHg)
0
2
4
6
8
10
0 5 10
Patient 20
0 5 10
Patient 81
JM & JMbayes – August 11, 2015 34/37
5.3 Dyn. Predictions – Illustration (cont’d)
0 5 10 15
024681012
Time
Patient 20
0.0
0.2
0.4
0.6
0.8
1.0
AorticGradient(mmHg)
0 5 10 15
024681012
Time
0.0
0.2
0.4
0.6
0.8
1.0
Patient 81
Re−Operation−FreeSurvival
JM & JMbayes – August 11, 2015 35/37
5.3 Dyn. Predictions – Illustration (cont’d)
0 5 10 15
024681012
Time
Patient 20
0.0
0.2
0.4
0.6
0.8
1.0
AorticGradient(mmHg)
0 5 10 15
024681012
Time
0.0
0.2
0.4
0.6
0.8
1.0
Patient 81
Re−Operation−FreeSurvival
JM & JMbayes – August 11, 2015 35/37
5.3 Dyn. Predictions – Illustration (cont’d)
0 5 10 15
024681012
Time
Patient 20
0.0
0.2
0.4
0.6
0.8
1.0
AorticGradient(mmHg)
0 5 10 15
024681012
Time
0.0
0.2
0.4
0.6
0.8
1.0
Patient 81
Re−Operation−FreeSurvival
JM & JMbayes – August 11, 2015 35/37
5.3 Prediction Survival – Illustration (cont’d)
0 5 10 15
024681012
Time
Patient 20
0.0
0.2
0.4
0.6
0.8
1.0
AorticGradient(mmHg)
0 5 10 15
024681012
Time
0.0
0.2
0.4
0.6
0.8
1.0
Patient 81
Re−Operation−FreeSurvival
JM & JMbayes – August 11, 2015 35/37
5.3 Dyn. Predictions – Illustration (cont’d)
0 5 10 15
024681012
Time
Patient 20
0.0
0.2
0.4
0.6
0.8
1.0
AorticGradient(mmHg)
0 5 10 15
024681012
Time
0.0
0.2
0.4
0.6
0.8
1.0
Patient 81
Re−Operation−FreeSurvival
JM & JMbayes – August 11, 2015 35/37
5.3 Dyn. Predictions – Illustration (cont’d)
0 5 10 15
024681012
Time
Patient 20
0.0
0.2
0.4
0.6
0.8
1.0
AorticGradient(mmHg)
0 5 10 15
024681012
Time
0.0
0.2
0.4
0.6
0.8
1.0
Patient 81
Re−Operation−FreeSurvival
JM & JMbayes – August 11, 2015 35/37
6. Resources
• JM
◃ JSS paper (http://www.jstatsoft.org/v35/i09/)
◃ book for joint models (http://jmr.r-forge.r-project.org/)
• JMbayes
◃ JSS paper (http://arxiv.org/abs/1404.7625; to appear)
JM & JMbayes – August 11, 2015 36/37
Thank you for your attention!
JM & JMbayes – August 11, 2015 37/37

JM and JMbayes @ JSM2015

  • 1.
    Fitting Joint Modelsin R using Packages JM and JMbayes Dimitris Rizopoulos Department of Biostatistics, Erasmus Medical Center, the Netherlands d.rizopoulos@erasmusmc.nl Joint Statistical Meetings August 11th, 2015
  • 2.
    1.1 Introduction • Oftenin follow-up studies different types of outcomes are collected • Explicit outcomes ◃ multiple longitudinal responses (e.g., markers, blood values) ◃ time-to-event(s) of particular interest (e.g., death, relapse) • Implicit outcomes ◃ missing data (e.g., dropout, intermittent missingness) ◃ random visit times JM & JMbayes – August 11, 2015 1/37
  • 3.
    1.2 Illustrative CaseStudy • Aortic Valve study: Patients who received a human tissue valve in the aortic position ◃ data collected by Erasmus MC (from 1987 to 2008); 77 received sub-coronary implantation; 209 received root replacement • Outcomes of interest: ◃ death and re-operation → composite event ◃ aortic gradient JM & JMbayes – August 11, 2015 2/37
  • 4.
    1.3 Research Questions •Depending on the questions of interest, different types of statistical analysis are required • We will distinguish between two general types of analysis ◃ separate analysis per outcome ◃ joint analysis of outcomes • Focus on each outcome separately ◃ does treatment affect survival? ◃ are the average longitudinal evolutions different between males and females? ◃ . . . JM & JMbayes – August 11, 2015 3/37
  • 5.
    1.3 Research Questions(cont’d) • Focus on multiple outcomes ◃ Complex effect estimation: how strong is the association between the longitudinal outcome and the hazard rate of death? ◃ Handling implicit outcomes: focus on the longitudinal outcome but with dropout JM & JMbayes – August 11, 2015 4/37
  • 6.
    1.3 Research Questions(cont’d) In the Aortic Valve dataset: • Research Question: ◃ Can we utilize available aortic gradient measurements to predict survival/re-operation JM & JMbayes – August 11, 2015 5/37
  • 7.
    1.4 Goals • Methodsfor the separate analysis of such outcomes are well established in the literature • Survival data: ◃ Cox model, accelerated failure time models, . . . • Longitudinal data ◃ mixed effects models, GEE, marginal models, . . . JM & JMbayes – August 11, 2015 6/37
  • 8.
    1.4 Goals (cont’d) •Goals of this talk: ◃ introduce joint models ◃ illustrate present software capabilities in R JM & JMbayes – August 11, 2015 7/37
  • 9.
    2.1 Joint ModelingFramework • To answer our questions of interest we need to postulate a model that relates ◃ the aortic gradient with ◃ the time to death or re-operation • Problem: Aortic gradient is an endogenous time-dependent covariate (Kalbfleisch and Prentice, 2002, Section 6.3) ◃ Measurements on the same patient are correlated ◃ Endogenous (aka internal): the future path of the covariate up to any time t > s IS affected by the occurrence of an event at time point s JM & JMbayes – August 11, 2015 8/37
  • 10.
    2.1 Joint ModelingFramework (cont’d) • What is special about endogenous time-dependent covariates ◃ measured with error ◃ the complete history is not available ◃ existence directly related to failure status • What if we use the Cox model? ◃ the association size can be severely underestimated ◃ true potential of the marker will be masked JM & JMbayes – August 11, 2015 9/37
  • 11.
    2.1 Joint ModelingFramework (cont’d) 0 1 2 3 4 5 46810 Time (years) AoGrad Death observed Aortic Gradient time−dependent Cox JM & JMbayes – August 11, 2015 10/37
  • 12.
    2.1 Joint ModelingFramework (cont’d) • To account for the special features of these covariates a new class of models has been developed Joint Models for Longitudinal and Time-to-Event Data • Intuitive idea behind these models 1. use an appropriate model to describe the evolution of the marker in time for each patient 2. the estimated evolutions are then used in a Cox model • Feature: Marker level is not assumed constant between visits JM & JMbayes – August 11, 2015 11/37
  • 13.
    2.1 Joint ModelingFramework (cont’d) Time 0.10.20.30.4 hazard 0.00.51.01.52.0 0 2 4 6 8 marker JM & JMbayes – August 11, 2015 12/37
  • 14.
    2.1 Joint ModelingFramework (cont’d) • We define a standard joint model ◃ Survival Part: Relative risk model hi(t) = h0(t) exp{γ⊤ wi + αmi(t)}, where * mi(t) = the true & unobserved value of aortic gradient at time t * α quantifies the effect of aortic gradient on the risk for death/re-operation * wi baseline covariates JM & JMbayes – August 11, 2015 13/37
  • 15.
    2.1 Joint ModelingFramework (cont’d) ◃ Longitudinal Part: Reconstruct Mi(t) = {mi(s), 0 ≤ s < t} using yi(t) and a mixed effects model (we focus on continuous markers) yi(t) = mi(t) + εi(t) = x⊤ i (t)β + z⊤ i (t)bi + εi(t), εi(t) ∼ N(0, σ2 ), where * xi(t) and β: Fixed-effects part * zi(t) and bi: Random-effects part, bi ∼ N(0, D) JM & JMbayes – August 11, 2015 14/37
  • 16.
    3.1 Joint Modelsin R • Joint models are fitted using function jointModel() from package JM. This function accepts as main arguments a linear mixed model and a Cox PH model based on which it fits the corresponding joint model lmeFit <- lme(CD4 ~ obstime + obstime:drug, random = ~ obstime | patient, data = aids) coxFit <- coxph(Surv(Time, death) ~ drug, data = aids.id, x = TRUE) jointFit <- jointModel(lmeFit, coxFit, timeVar = "obstime", method = "piecewise-PH-aGH") summary(jointFit) JM & JMbayes – August 11, 2015 15/37
  • 17.
    3.1 Joint Modelsin R • As before, the data frame given in lme() should be in the long format, while the data frame given to coxph() should have one line per subject∗ ◃ the ordering of the subjects needs to be the same • In the call to coxph() you need to set x = TRUE (or model = TRUE) such that the design matrix used in the Cox model is returned in the object fit • Argument timeVar specifies the time variable in the linear mixed model ∗ Unless you want to include exogenous time-varying covariates or handle competing risks JM & JMbayes – August 11, 2015 16/37
  • 18.
    3.1 Joint Modelsin R • Argument method specifies the type of relative risk model and the type of numerical integration algorithm – the syntax is as follows: <baseline hazard>-<parameterization>-<numerical integration> Available options are: ◃ "piecewise-PH-GH": PH model with piecewise-constant baseline hazard ◃ "spline-PH-GH": PH model with B-spline-approximated log baseline hazard ◃ "weibull-PH-GH": PH model with Weibull baseline hazard ◃ "weibull-AFT-GH": AFT model with Weibull baseline hazard ◃ "Cox-PH-GH": PH model with unspecified baseline hazard GH stands for standard Gauss-Hermite; using aGH invokes the pseudo-adaptive Gauss-Hermite rule JM & JMbayes – August 11, 2015 17/37
  • 19.
    3.1 Joint Modelsin R • Joint models under the Bayesian approach are fitted using function jointModelBayes() from package JMbayes. This function works in a very similar manner as function jointModel(), e.g., lmeFit <- lme(CD4 ~ obstime + obstime:drug, random = ~ obstime | patient, data = aids) coxFit <- coxph(Surv(Time, death) ~ drug, data = aids.id, x = TRUE) jointFitBayes <- jointModelBayes(lmeFit, coxFit, timeVar = "obstime") summary(jointFitBayes) JM & JMbayes – August 11, 2015 18/37
  • 20.
    3.1 Joint Modelsin R • JMbayes is more flexible (in some respects): ◃ directly implements the MCMC ◃ allows for categorical longitudinal data as well ◃ allows for general transformation functions ◃ penalized B-splines for the baseline hazard function ◃ . . . JM & JMbayes – August 11, 2015 19/37
  • 21.
    3.1 Joint Modelsin R • In both packages methods are available for the majority of the standard generic functions + extras ◃ summary(), anova(), vcov(), logLik() ◃ coef(), fixef(), ranef() ◃ fitted(), residuals() ◃ plot() ◃ xtable() (you need to load package xtable first) JM & JMbayes – August 11, 2015 20/37
  • 22.
    4.1 Association Structures •The standard assumption is    hi(t | Mi(t)) = h0(t) exp{γ⊤ wi + αmi(t)}, yi(t) = mi(t) + εi(t) = x⊤ i (t)β + z⊤ i (t)bi + εi(t), where Mi(t) = {mi(s), 0 ≤ s < t} JM & JMbayes – August 11, 2015 21/37
  • 23.
    4.1 Association structures(cont’d) Time 0.10.20.30.4 hazard 0.00.51.01.52.0 0 2 4 6 8 marker JM & JMbayes – August 11, 2015 22/37
  • 24.
    4.1 Association Structures(cont’d) • The standard assumption is    hi(t | Mi(t)) = h0(t) exp{γ⊤ wi + αmi(t)}, yi(t) = mi(t) + εi(t) = x⊤ i (t)β + z⊤ i (t)bi + εi(t), where Mi(t) = {mi(s), 0 ≤ s < t} Is this the only option? Is this the most optimal for prediction? JM & JMbayes – August 11, 2015 23/37
  • 25.
    4.2 Time-dependent Slopes •The hazard for an event at t is associated with both the current value and the slope of the trajectory at t (Ye et al., 2008, Biometrics): hi(t | Mi(t)) = h0(t) exp{γ⊤ wi + α1mi(t) + α2m′ i(t)}, where m′ i(t) = d dt {x⊤ i (t)β + z⊤ i (t)bi} JM & JMbayes – August 11, 2015 24/37
  • 26.
    4.2 Time-dependent Slopes(cont’d) Time 0.10.20.30.4 hazard 0.00.51.01.52.0 0 2 4 6 8 marker JM & JMbayes – August 11, 2015 25/37
  • 27.
    4.3 Cumulative Effects •The hazard for an event at t is associated with area under the trajectory up to t: hi(t | Mi(t)) = h0(t) exp { γ⊤ wi + α ∫ t 0 mi(s) ds } • Area under the longitudinal trajectory taken as a summary of Mi(t) JM & JMbayes – August 11, 2015 26/37
  • 28.
    4.3 Cumulative Effects(cont’d) Time 0.10.20.30.4 hazard 0.00.51.01.52.0 0 2 4 6 8 marker JM & JMbayes – August 11, 2015 27/37
  • 29.
    4.4 Weighted CumulativeEffects • The hazard for an event at t is associated with the area under the weighted trajectory up to t: hi(t | Mi(t)) = h0(t) exp { γ⊤ wi + α ∫ t 0 ϖ(t − s)mi(s) ds } , where ϖ(·) appropriately chosen weight function, e.g., ◃ Gaussian density ◃ Student’s-t density ◃ . . . JM & JMbayes – August 11, 2015 28/37
  • 30.
    4.5 Association Structuresin JM & JMbayes • Both package give options to define the aforementioned association structures ◃ in JM via arguments parameterization & derivForm ◃ in JMbayes via arguments param & extraForm • JMbayes also gives the option for general transformation functions, e.g., hi(t | Mi(t)) = h0(t) exp{γ⊤ wi + α1mi(t) + α2mi(t) × Treati + α3m′ i(t) + α3(m′ i(t))2 }, JM & JMbayes – August 11, 2015 29/37
  • 31.
    5.1 Predictions –Definitions • We are interested in predicting survival probabilities for a new patient j that has provided a set of aortic gradient measurements up to a specific time point t • Example: We consider Patients 20 and 81 from the Aortic Valve dataset JM & JMbayes – August 11, 2015 30/37
  • 32.
    5.1 Predictions –Definitions (cont’d) Follow−up Time (years) AorticGradient(mmHg) 0 2 4 6 8 10 0 5 10 Patient 20 0 5 10 Patient 81 JM & JMbayes – August 11, 2015 31/37
  • 33.
    5.1 Predictions –Definitions (cont’d) Follow−up Time (years) AorticGradient(mmHg) 0 2 4 6 8 10 2 4 6 8 10 12 Patient 20 2 4 6 8 10 12 Patient 81 JM & JMbayes – August 11, 2015 31/37
  • 34.
    5.1 Predictions –Definitions (cont’d) Follow−up Time (years) AorticGradient(mmHg) 0 2 4 6 8 10 2 4 6 8 10 12 Patient 20 2 4 6 8 10 12 Patient 81 JM & JMbayes – August 11, 2015 31/37
  • 35.
    5.1 Predictions –Definitions (cont’d) • What do we know for these patients? ◃ a series of aortic gradient measurements ◃ patient are event-free up to the last measurement • Dynamic Prediction survival probabilities are dynamically updated as additional longitudinal information is recorded JM & JMbayes – August 11, 2015 32/37
  • 36.
    5.2 Predictions –JM & JMbayes • Individualized predictions of survival probabilities are computed by function survfitJM() – for example, for Patient 2 from the PBC dataset we have sfit <- survfitJM(jointFit, newdata = pbc2[pbc2$id == "2", ]) sfit plot(sfit) plot(sfit, include.y = TRUE) JM & JMbayes – August 11, 2015 33/37
  • 37.
    5.3 Dyn. Predictions– Illustration Follow−up Time (years) AorticGradient(mmHg) 0 2 4 6 8 10 0 5 10 Patient 20 0 5 10 Patient 81 JM & JMbayes – August 11, 2015 34/37
  • 38.
    5.3 Dyn. Predictions– Illustration (cont’d) 0 5 10 15 024681012 Time Patient 20 0.0 0.2 0.4 0.6 0.8 1.0 AorticGradient(mmHg) 0 5 10 15 024681012 Time 0.0 0.2 0.4 0.6 0.8 1.0 Patient 81 Re−Operation−FreeSurvival JM & JMbayes – August 11, 2015 35/37
  • 39.
    5.3 Dyn. Predictions– Illustration (cont’d) 0 5 10 15 024681012 Time Patient 20 0.0 0.2 0.4 0.6 0.8 1.0 AorticGradient(mmHg) 0 5 10 15 024681012 Time 0.0 0.2 0.4 0.6 0.8 1.0 Patient 81 Re−Operation−FreeSurvival JM & JMbayes – August 11, 2015 35/37
  • 40.
    5.3 Dyn. Predictions– Illustration (cont’d) 0 5 10 15 024681012 Time Patient 20 0.0 0.2 0.4 0.6 0.8 1.0 AorticGradient(mmHg) 0 5 10 15 024681012 Time 0.0 0.2 0.4 0.6 0.8 1.0 Patient 81 Re−Operation−FreeSurvival JM & JMbayes – August 11, 2015 35/37
  • 41.
    5.3 Prediction Survival– Illustration (cont’d) 0 5 10 15 024681012 Time Patient 20 0.0 0.2 0.4 0.6 0.8 1.0 AorticGradient(mmHg) 0 5 10 15 024681012 Time 0.0 0.2 0.4 0.6 0.8 1.0 Patient 81 Re−Operation−FreeSurvival JM & JMbayes – August 11, 2015 35/37
  • 42.
    5.3 Dyn. Predictions– Illustration (cont’d) 0 5 10 15 024681012 Time Patient 20 0.0 0.2 0.4 0.6 0.8 1.0 AorticGradient(mmHg) 0 5 10 15 024681012 Time 0.0 0.2 0.4 0.6 0.8 1.0 Patient 81 Re−Operation−FreeSurvival JM & JMbayes – August 11, 2015 35/37
  • 43.
    5.3 Dyn. Predictions– Illustration (cont’d) 0 5 10 15 024681012 Time Patient 20 0.0 0.2 0.4 0.6 0.8 1.0 AorticGradient(mmHg) 0 5 10 15 024681012 Time 0.0 0.2 0.4 0.6 0.8 1.0 Patient 81 Re−Operation−FreeSurvival JM & JMbayes – August 11, 2015 35/37
  • 44.
    6. Resources • JM ◃JSS paper (http://www.jstatsoft.org/v35/i09/) ◃ book for joint models (http://jmr.r-forge.r-project.org/) • JMbayes ◃ JSS paper (http://arxiv.org/abs/1404.7625; to appear) JM & JMbayes – August 11, 2015 36/37
  • 45.
    Thank you foryour attention! JM & JMbayes – August 11, 2015 37/37