Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage...

36
Introduction Package Description Illustration Summary Empirical Transition Matrix of Multistate Models: The etm Package Arthur Allignol 1,2,* Martin Schumacher 2 Jan Beyersmann 1,2 1 Freiburg Center for Data Analysis and Modeling, University of Freiburg 2 Institute of Medical Biometry and Medical Informatics, University Medical Center Freiburg * [email protected] DFG Forschergruppe FOR 534 1

Transcript of Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage...

Page 1: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Empirical Transition Matrixof Multistate Models:

The etm Package

Arthur Allignol1,2,∗ Martin Schumacher2 Jan Beyersmann1,2

1Freiburg Center for Data Analysis and Modeling, University of Freiburg2Institute of Medical Biometry and Medical Informatics, University Medical Center Freiburg

[email protected]

DFG Forschergruppe FOR 534

1

Page 2: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Introduction

I Multistate models provide a relevant modelling framework forcomplex event history data

I MSM: Stochastic process that at any time occupies one of a set ofdiscrete states

I Health conditionsI Disease stages

I Data consist of:I Transition timesI Type of transition

I Possible right-censoring and/or left-truncation

Allignol A. etm Package 2

Page 3: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Introduction

I Multistate models provide a relevant modelling framework forcomplex event history data

I MSM: Stochastic process that at any time occupies one of a set ofdiscrete states

I Health conditionsI Disease stages

I Data consist of:I Transition timesI Type of transition

I Possible right-censoring and/or left-truncation

Allignol A. etm Package 2

Page 4: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Introduction

I Survival data

0 1

Allignol A. etm Package 3

Page 5: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Introduction

I Illness-death model with recovery

0

1

2

Allignol A. etm Package 3

Page 6: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Introduction

I Time-inhomogeneous Markov process Xt∈[0,+∞)

I Finite state space S = {0, . . . ,K}I Right-continuous sample paths Xt+ = Xt

I Transition hazards

αij(t)dt = P(Xt+dt = j |Xt = i), i , j ∈ S, i 6= j

I Completely describe the multistate process

I Cumulative transition hazards

Aij(t) =

∫ t

0αij(u)du

Allignol A. etm Package 4

Page 7: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Introduction

I Time-inhomogeneous Markov process Xt∈[0,+∞)

I Finite state space S = {0, . . . ,K}I Right-continuous sample paths Xt+ = Xt

I Transition hazards

αij(t)dt = P(Xt+dt = j |Xt = i), i , j ∈ S, i 6= j

I Completely describe the multistate process

I Cumulative transition hazards

Aij(t) =

∫ t

0αij(u)du

Allignol A. etm Package 4

Page 8: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Introduction

I Time-inhomogeneous Markov process Xt∈[0,+∞)

I Finite state space S = {0, . . . ,K}I Right-continuous sample paths Xt+ = Xt

I Transition hazards

αij(t)dt = P(Xt+dt = j |Xt = i), i , j ∈ S, i 6= j

I Completely describe the multistate process

I Cumulative transition hazards

Aij(t) =

∫ t

0αij(u)du

Allignol A. etm Package 4

Page 9: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Introduction

I Transition probabilities

Pij(s, t) = P(Xt = j |Xs = i), i , j ∈ S, s ≤ t

I Matrix of transition probabilities

P(s, t) =

(s,t]

(I + dA(u))

I a (K + 1)× (K + 1) matrix

Allignol A. etm Package 5

Page 10: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Introduction

I Transition probabilities

Pij(s, t) = P(Xt = j |Xs = i), i , j ∈ S, s ≤ t

I Matrix of transition probabilities

P(s, t) =

(s,t]

(I + dA(u))

I a (K + 1)× (K + 1) matrix

Allignol A. etm Package 5

Page 11: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Introduction

I The covariance matrix is computed using the following recursionformula:

cov(P(s, t)) =

{(I + ∆A(t))T ⊗ I}cov(P(s, t−)){(I + ∆A(t))⊗ I}+ {I⊗ P(s, t−)}cov(∆A(t)){I⊗ P(s, t−)T}

I Estimator of the Greenwood typeI Enables integrated cumulative hazards of not being necessarily

continuousI Reduces to usual Greenwood estimator in the univariate setting

I Found to be the preferred estimator in simulation studies for survivaland competing risks data

Allignol A. etm Package 6

Page 12: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Introduction

I The covariance matrix is computed using the following recursionformula:

cov(P(s, t)) =

{(I + ∆A(t))T ⊗ I}cov(P(s, t−)){(I + ∆A(t))⊗ I}+ {I⊗ P(s, t−)}cov(∆A(t)){I⊗ P(s, t−)T}

I Estimator of the Greenwood typeI Enables integrated cumulative hazards of not being necessarily

continuousI Reduces to usual Greenwood estimator in the univariate setting

I Found to be the preferred estimator in simulation studies for survivaland competing risks data

Allignol A. etm Package 6

Page 13: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Introduction

I The covariance matrix is computed using the following recursionformula:

cov(P(s, t)) =

{(I + ∆A(t))T ⊗ I}cov(P(s, t−)){(I + ∆A(t))⊗ I}+ {I⊗ P(s, t−)}cov(∆A(t)){I⊗ P(s, t−)T}

I Estimator of the Greenwood typeI Enables integrated cumulative hazards of not being necessarily

continuousI Reduces to usual Greenwood estimator in the univariate setting

I Found to be the preferred estimator in simulation studies for survivaland competing risks data

Allignol A. etm Package 6

Page 14: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

In R

I survival and cmprsk estimate survival and cumulative incidencefunctions, respectively

I Outputs can be used to compute transition probabilities in morecomplex models when transition probabilities take an explicit form

I cmprsk does not handle left-truncationI Variance computation “by hand”

I mvna estimates cumulative transition hazardsI changeLOS computes transition probabilities

I Lacks variance estimationI Cannot handle left-truncation

=⇒ etm

Allignol A. etm Package 7

Page 15: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

In R

I survival and cmprsk estimate survival and cumulative incidencefunctions, respectively

I Outputs can be used to compute transition probabilities in morecomplex models when transition probabilities take an explicit form

I cmprsk does not handle left-truncationI Variance computation “by hand”

I mvna estimates cumulative transition hazardsI changeLOS computes transition probabilities

I Lacks variance estimationI Cannot handle left-truncation

=⇒ etm

Allignol A. etm Package 7

Page 16: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

In R

I survival and cmprsk estimate survival and cumulative incidencefunctions, respectively

I Outputs can be used to compute transition probabilities in morecomplex models when transition probabilities take an explicit form

I cmprsk does not handle left-truncationI Variance computation “by hand”

I mvna estimates cumulative transition hazardsI changeLOS computes transition probabilities

I Lacks variance estimationI Cannot handle left-truncation

=⇒ etm

Allignol A. etm Package 7

Page 17: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Package Description

I The main function etm

etm(data, state.names, tra, cens.name, s, t = "last",covariance = TRUE, delta.na = TRUE)

I 4 methodsI printI summaryI plotI xyplot

I 2 data sets

Allignol A. etm Package 8

Page 18: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Package Description

I The main function etm

etm(data, state.names, tra, cens.name, s, t = "last",covariance = TRUE, delta.na = TRUE)

I 4 methodsI printI summaryI plotI xyplot

I 2 data sets

Allignol A. etm Package 8

Page 19: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Illustration: DLI Data

I 614 patients who received allogeneic stem cell transplantation forchronic myeloid leukaemia between 1981 and 2002

I All patients achieved complete remission

I Patients in first relapse were offered a donor lymphocyte infusion(DLI)

I Infusion of lymphocytes harvested from the original stem cell donorI DLI produces durable remissions in a substantial number of patients

Allignol A. etm Package 9

Page 20: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Illustration: DLI Data

I 614 patients who received allogeneic stem cell transplantation forchronic myeloid leukaemia between 1981 and 2002

I All patients achieved complete remission

I Patients in first relapse were offered a donor lymphocyte infusion(DLI)

I Infusion of lymphocytes harvested from the original stem cell donorI DLI produces durable remissions in a substantial number of patients

Allignol A. etm Package 9

Page 21: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Illustration: DLI Data

0

2

4

6

1

3

5

7

8

Alive in

Remission

Dead in Remission

Alive in

Relapse

Dead in Relapse

Alive with DLI

Dead with DLI in Relapse

Alive in

RemissionDead

in Remission

Alive in Relapse

Allignol A. etm Package 10

Page 22: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Illustration: DLI Data

I Current leukaemia free survival (CLFS): Probability that a patient isalive and leukaemia-free at a given point in time after the transplant

I Probability of being in state 0 or 6 at time t

Allignol A. etm Package 11

Page 23: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Illustration: DLI Data

I Current leukaemia free survival (CLFS): Probability that a patient isalive and leukaemia-free at a given point in time after the transplant

I Probability of being in state 0 or 6 at time t

CLFS(t) = P00(0, t) + P06(0, t)

Allignol A. etm Package 11

Page 24: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Illustration: DLI Data

I Current leukaemia free survival (CLFS): Probability that a patient isalive and leukaemia-free at a given point in time after the transplant

I Probability of being in state 0 or 6 at time t

CLFS(t) = P00(0, t) + P06(0, t)

P06(s, t) =∑

s<u≤v≤r≤t

P(s, u−)dN02(u)

Y0(u)P22(u, v−)× dN24(v)

Y2(v)

× P44(v , r−)dN46(r)

Y4(r)P66(r , t)

Allignol A. etm Package 11

Page 25: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Illustration: DLI Data

I Current leukaemia free survival (CLFS): Probability that a patient isalive and leukaemia-free at a given point in time after the transplant

I Probability of being in state 0 or 6 at time t

CLFS(t) = P00(0, t) + P06(0, t)

var(CLFS(t)) =

var(P00(0, t)) + var(P06(0, t)) + 2cov(P00(0, t), P06(0, t))

Allignol A. etm Package 11

Page 26: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Illustration: DLI Data

> tra <- matrix(FALSE, 9, 9)

> tra[1, 2:3] <- TRUE

> tra[3, 4:5] <- TRUE

> tra[5, 6:7] <- TRUE

> tra[7, 8:9] <- TRUE

> tra

0 1 2 3 4 5 6 7 8

0 FALSE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE

1 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE

2 FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE

3 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE

4 FALSE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE

5 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE

6 FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE

7 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE

8 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE

> dli.etm <- etm(dli.data, as.character(0:8), tra, "cens", s = 0)

Allignol A. etm Package 12

Page 27: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Illustration: DLI Data

> clfs <- dli.etm$est["0", "0", ] + dli.etm$est["0", "6", ]

> var.clfs <- dli.etm$cov["0 0", "0 0", ] +

+ dli.etm$cov["0 6", "0 6", ] + 2 * dli.etm$cov["0 0", "0 6", ]

0 5 10 15 20

0.0

0.2

0.4

0.6

0.8

1.0

Year

Pro

babi

lity

CLFSLFS

Allignol A. etm Package 13

Page 28: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Illustration: DLI Data

> clfs <- dli.etm$est["0", "0", ] + dli.etm$est["0", "6", ]

> var.clfs <- dli.etm$cov["0 0", "0 0", ] +

+ dli.etm$cov["0 6", "0 6", ] + 2 * dli.etm$cov["0 0", "0 6", ]

0 5 10 15 20

0.0

0.2

0.4

0.6

0.8

1.0

Year

Pro

babi

lity

CLFSLFS

Allignol A. etm Package 13

Page 29: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Summary

I etm provides a way to easily estimate and display the matrix oftransition probabilities from multistate models

I Permits to compute interesting quantities that depend on the matrixof transition probabilities

I Empirical transition matrix valid under the Markov assumptionI Stage occupation probability estimates still valid for more general

models

Allignol A. etm Package 14

Page 30: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

Bibliography

Allignol, A., Schumacher, J. and Beyersmann, J. (2009). A note on variance estimation ofthe Aalen-Johansen Estimator of the cumulative incidence function in competing risks,with a view towards left-truncated data.Under revision.

Andersen, P. K., Borgan, O., Gill, R. D. and Keiding, N. (1993).Statistical Models Based on Counting Processes.Springer-Verlag, New-York.

Datta, S. and Satten, G. A. (2001).Validity of the Aalen-Johansen Estimators of Stage Occupation Probabilities andNelson-Aalen Estimators of Integrated Transition Hazards for non-Markov Models.Statistics & Probability Letters, 55:403–411.

Klein, J. P., Szydlo, R. M., Craddock, C. and Goldman, J. M. (2000)Estimation of Current Leukaemia-Free Survival Following Donor Lymphocyte InfusionTherapy for Patients with Leukaemia who Relapse after Allografting: Application of aMultistate ModelStatistics in Medicine, 19:3005–3016.

I Thanks to Mei-Jie Zhang (Medical College of Wisconsin) for providing uswith the DLI data

Allignol A. etm Package 15

Page 31: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

EmpiricalTransitionMatrix

I A(t) the matrix of cumulative transition hazards

I Non-diagonal entries estimated by the Nelson-Aalen estimator

Aij(t) =∑tk≤t

∆Nij(tk)

Yi (tk), i 6= j

I Diagonal entries

Aii (t) = −∑j 6=i

Aij(t)

Allignol A. etm Package 16

Page 32: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

EmpiricalTransitionMatrix

I A(t) the matrix of cumulative transition hazardsI Non-diagonal entries estimated by the Nelson-Aalen estimator

Aij(t) =∑tk≤t

∆Nij(tk)

Yi (tk), i 6= j

I Diagonal entries

Aii (t) = −∑j 6=i

Aij(t)

Allignol A. etm Package 16

Page 33: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

EmpiricalTransitionMatrix

I A(t) the matrix of cumulative transition hazardsI Non-diagonal entries estimated by the Nelson-Aalen estimator

Aij(t) =∑tk≤t

∆Nij(tk)

Yi (tk), i 6= j

I Diagonal entries

Aii (t) = −∑j 6=i

Aij(t)

Allignol A. etm Package 16

Page 34: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

EmpiricalTransitionMatrix

I Empirical transition matrix

P(s, t) =

(s,t]

(I + dA(u))

I A(t) is a matrix of step-functions with a finite number of jumps on(s, t]

P(s, t) =∏

s<tk≤t

(I + ∆A(tk)

)

I ∆A(t) = A(t)− A(t−)

Allignol A. etm Package 17

Page 35: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

EmpiricalTransitionMatrix

I Empirical transition matrix

P(s, t) =

(s,t]

(I + dA(u))

I A(t) is a matrix of step-functions with a finite number of jumps on(s, t]

P(s, t) =∏

s<tk≤t

(I + ∆A(tk)

)

I ∆A(t) = A(t)− A(t−)

Allignol A. etm Package 17

Page 36: Empirical Transition Matrix of Multistate Models: The etm ... · PDF fileIntroductionPackage DescriptionIllustrationSummary Empirical Transition Matrix of Multistate Models: The etm

Introduction Package Description Illustration Summary

DLI ExampleCurrent Leukaemia Free Survival

0 5 10 15 20

0.0

0.2

0.4

0.6

0.8

1.0

Time

Cur

rent

Leu

kaem

ia F

ree

Sur

viva

l

EarlyLate

Allignol A. etm Package 18