21
. . . . . . . . Introduction . . . . hlme . . . . . . lcmm . . . . . Jointlcmm . . Conclusion LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event data ecile Proust-Lima Department of Biostatistics, INSERM U897, Bordeaux Segalen University in collaboration with Amadou Diakit´ e and Benoit Liquet Department of Biostatistics, INSERM U897, Bordeaux Segalen University Rencontres R - Bordeaux - July 2nd, 2012

LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

  • Upload
    others

  • View
    17

  • Download
    0

Embed Size (px)

Citation preview

Page 1: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

LCMM: a R package for the estimation oflatent class mixed models

for Gaussian, ordinal, curvilinearlongitudinal data and/or time-to-event data

Cecile Proust-LimaDepartment of Biostatistics, INSERM U897, Bordeaux Segalen University

in collaboration withAmadou Diakite and Benoit Liquet

Department of Biostatistics, INSERM U897, Bordeaux Segalen University

Rencontres R - Bordeaux - July 2nd, 2012

Page 2: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Context

Linear mixed model (LMM) routinely used in longitudinal studies todescribe change over time of longitudinal outcomes according tocovariates

Assumptions :

(i) continuous longitudinal outcome

(ii) Gaussian random-effects and errors

(iii) linearity of the relationships with the outcome

(iv) homogeneous population

(v) missing at random data

Widely implemented : lme, lmer in R ; proc mixed in SAS

Page 3: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Objective of lcmm

To provide a package that extends the linear mixed model estimation to :

- heterogeneous populations (relax (iv))

→ hlme for latent class linear mixed models (i.e. Gaussian continuous

outcome)

- other types of longitudinal outcomes : ordinal, (bounded)quantitative non-Gaussian outcomes (relax (i), (ii), (iii), (iv))

→ lcmm for general latent class mixed models with outcomes ofdifferent nature

- joint analysis of a time-to-event (relax (iv), (v))

→ Jointlcmm for joint latent class models with a longitudinaloutcome and a right-censored (left-truncated) time-to-event

Page 4: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Heterogeneous profiles of trajectory

Ex : Trajectories of verbal fluency in the elderly

0

5

10

15

20

25

30

35

40

0 2 4 6 8 10 12 14

Isaa

cs S

et T

est

time since entry in the cohort

Page 5: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Heterogeneous profiles of trajectory

Ex : Trajectories of verbal fluency in the elderly

0

5

10

15

20

25

30

35

40

0 2 4 6 8 10 12 14

Isaa

cs S

et T

est

time since entry in the cohort

Page 6: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Latent class linear mixed model : the model

N subjects (i, i = 1, ..., N) & G latent classes (g, g = 1, ..., G)

Discrete latent variable ci for the latent group structure :ci = g if subject i belongs to class g

πig = P (ci = g|X1i) =eξ0g+X1i

′ξ1g∑Gl=1 e

ξ0l+X1i′ξ1l

Repeated measures of the longitudinal marker Yij (j = 1, ..., ni) :

Yij |ci=g = Z ′ijuig +X ′

2ijβ +X ′3ijγg + ϵij

Zij , X2ij , X3ij : 3 different vectors of covariates without overlapuig ∼ N

(µg, ω

2gB

)& ϵij ∼ N

(0, σ2

)

Page 7: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Latent class linear mixed model : the implementation

hlme(fixed= Y ∼ Time+X1+Time:X1, random=∼ Time,

subject=’ID’, mixture=∼ Time, classmb=∼ X2+X3, ng=2,

data=data hlme, B=Binit)

Program details :

- Program written in Fortran90 and interfaced in R

- Marquardt algorithm for a fixed number of latent classes (strict

convergence criteria : likelihood & parameters & derivatives)

- Any functions of time for the longitudinal marker

- Predictors of the trajectory (fixed/mixture arguments) + predictors of theclass membership (classmb)

- Posterior functions : posterior classification, table of classification(postprob function), residuals, predictions (output element pred)

Page 8: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Example : profiles of verbal fluency trajectories

0

5

10

15

20

25

30

35

40

0 2 4 6 8 10 12 14 16

IST

years from entry in the cohort

class 1 (30.7%)class 2 (47.6%)class 3 (3.3%)

class 4 (18.4%)

using plot.predict function

Page 9: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Curvilinear continuous or ordinal outcomes

Psychological & quality-of-life longitudinal scales

- bounded quantitative or ordinal longitudinal markers

- varying sensitivity to change & ceiling/floor effects (“curvilinearity”)

MMSE distribution (well known psychometric test)

freq

uenc

y (%

)

0 5 10 15 20 25 30

0.00

0.05

0.10

0.15

0.20

Page 10: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Latent process mixed model (with latent classes)

YScale

Λinterestvariable ofLatent

Covariate XTime t

Structural Equation← Standard linear mixedmodel or latent class linear mixed model

Λi(t) = β0+β1t+β2Xi+β3Xi × t+u0i+u1it

Equation of observation← link between the latent processand the outcome

H(Yi(t); η) = Λi(t) + ϵi(t)

with H( ; η) = linear, Beta CdF, I-splines,

thresholds, etc

and ϵi(t) ∼ N (0, σ2) - (constraints : β0 = 0 and σ = 1)

Page 11: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

General latent class mixed model : the implementation

lcmm(Y ∼ Time+X1+X1:time, random=∼ Time, subject=’ID’,

mixture=∼ Time, classmb=∼ X2+X3, ng=2, link=’splines’)

Program details :

- Marquardt algorithm for a fixed number of latent classes (strict

convergence criteria)

- Likelihood : closed form if continuous transformations (Jacobian

decomposition) and approximated by Gauss-Hermite quadrature forthreshold models (cumulated probit model)

- Goodness-of-fit : usual information criteria + “discrete” AIC (& UACV) forcomparing discrete and continuous models

- Predictions in the original scale : direct or using numerical integration

Page 12: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Transformations of a psychometric test (MMSE))

−8 −6 −4 −2 0 2

05

1015

2025

30

MM

SE

−8 −6 −4 −2 0 2

05

1015

2025

30

MM

SE

−8 −6 −4 −2 0 2

05

1015

2025

30

MM

SE

−8 −6 −4 −2 0 2

05

1015

2025

30

MM

SE

−8 −6 −4 −2 0 2

05

1015

2025

30

MM

SE

−8 −6 −4 −2 0 2

05

1015

2025

30

MM

SE

linearAIC=45252trunc. linearAIC=45172splines (5−eq.)AIC=41874splines (5−qu.)AIC=41802Beta CDFAIC=41794thresholdsAIC=41568

using plot.linkfunction function or estimlink output

+ discrete AIC (and UACV)

Page 13: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Predictions in the latent process scale

65 70 75 80 85 90 95

−4

−3

−2

−1

01

Late

nt p

roce

ss

65 70 75 80 85 90 95

−4

−3

−2

−1

01

Late

nt p

roce

ss

65 70 75 80 85 90 95

−4

−3

−2

−1

01

Late

nt p

roce

ss

65 70 75 80 85 90 95

−4

−3

−2

−1

01

Late

nt p

roce

ss

65 70 75 80 85 90 95

−4

−3

−2

−1

01

Late

nt p

roce

ss

65 70 75 80 85 90 95

−4

−3

−2

−1

01

Late

nt p

roce

ss

65 70 75 80 85 90 95

−4

−3

−2

−1

01

Late

nt p

roce

ss

65 70 75 80 85 90 95

−4

−3

−2

−1

01

Late

nt p

roce

ss

65 70 75 80 85 90 95

−4

−3

−2

−1

01

Late

nt p

roce

ss

65 70 75 80 85 90 95

−4

−3

−2

−1

01

Late

nt p

roce

ss

65 70 75 80 85 90 95

−4

−3

−2

−1

01

Late

nt p

roce

ss

65 70 75 80 85 90 95

−4

−3

−2

−1

01

Late

nt p

roce

ss

thresholds95%CIsplines (5−qu.)95%CIbeta95%CIlinear95%CI

using plot.predict function

→ similar technique and output with covariate effects and/or latent classes

Page 14: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Predictions in the MMSE scale

65 70 75 80 85 90 95

1520

2530

MM

SE

65 70 75 80 85 90 95

1520

2530

MM

SE

65 70 75 80 85 90 95

1520

2530

MM

SE

65 70 75 80 85 90 95

1520

2530

MM

SE

65 70 75 80 85 90 95

1520

2530

MM

SE

65 70 75 80 85 90 95

1520

2530

MM

SE

thresholds

thresholds95%CIlinear95%CI

using predictY function with Bayesian approximation of the predictions

distribution

→ similar technique and output with covariate effects and/or latent classes

Page 15: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Heterogeneous profiles of trajectory in link with a clinicalevent

Ex : PSA trajectories after radiation therapy in Prostate Cancer

-1

-0.5

0

0.5

1

1.5

2

2.5

3

0 1 2 3 4 5 6 7 8 9

log(

PS

A+

0.1)

time since end of RT

no recurrence of Prostate cancer vs. recurrence of Prostate cancer

Page 16: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Joint latent class model : the principle

Latentclass

C

ObservedLatent

Longitudinal

Y marker

Subject i (i=1...,N)Class g (g=1,...,G)Occasion j (j=1...,ni)

Event T*

- Latent classes of subjects :

→ latent class membership :

πig = P (ci = g|X1i) =eξ0g+X1i

T ξ1g∑Gl=1 e

ξ0l+X1iT ξ1l

- Given class g,

→ specific marker evolution(mixed model)

→ specific risk of event(prop. hazard model)

Page 17: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Joint latent class model : the implementation

Jointlcmm(Y ∼ Time+X1+X1:time, random=∼ Time,

subject=’ID’, mixture=∼ Time, classmb=∼ X2+X3, ng=2,

survival=Surv(Tevt,Event) ∼ X1 + mixture(X4),

hazard=’Weibull-Specific’)

Program details :

- Same methodology as hlme and lcmm

- PHM with different possible hazards families (splines, piecewise, weibull) andspecification (common, specific, proportional over classes) + delayed entry

- Class-specific & class-common effects in the 3 submodels

- Information criteria + score test for conditional independence

- Predictive accuracy measures

Page 18: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Predicted trajectories & survival functions from JLCM(Proust-Lima, 2012)

0 2 4 6 8 10 12

−1

01

23

45

years since end of EBRT

log(

PS

A+

0.1)

0 2 4 6 8 10 12

−1

01

23

45

years since end of EBRT

log(

PS

A+

0.1)

0 2 4 6 8 10 12

−1

01

23

45

years since end of EBRT

log(

PS

A+

0.1)

0 2 4 6 8 10 12

−1

01

23

45

years since end of EBRT

log(

PS

A+

0.1)

Mean predicted PSA trajectories

0 2 4 6 8 10 12

0.0

0.2

0.4

0.6

0.8

1.0

years since end of EBRT

Eve

nt−

free

pro

babi

lity

0 2 4 6 8 10 12

0.0

0.2

0.4

0.6

0.8

1.0

years since end of EBRT

Eve

nt−

free

pro

babi

lity

0 2 4 6 8 10 12

0.0

0.2

0.4

0.6

0.8

1.0

years since end of EBRT

Eve

nt−

free

pro

babi

lity

0 2 4 6 8 10 12

0.0

0.2

0.4

0.6

0.8

1.0

years since end of EBRT

Eve

nt−

free

pro

babi

lity

G=1 (85%)G=2 (9%)G=3 (4%)G=4 (2%)

Mean predicted event−free probabilities

using plot.predict and plot.survival functions

Page 19: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Dynamic predictive accuracy (EPOCE) (Commenges, 2012 ;

Proust-Lima, 2012)

using epoce and diffepoce functions

Page 20: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Concluding remarks on lcmm R package

Extensions of the linear mixed model in MLE framework :

→ hlme : flexibility in covariate effects, trajectories

→ lcmm : analysis of subjective measures (psychological scales,patient-reported-outcomes)

→ Jointlcmm : computationally attractive alternative to R package JM(for shared random-effect joint models)

Planned improvements :

→ other outcomes in Jointlcmm (+ Poisson, logit in lcmm)

→ more post-fit analyses, estimation options, package spreading,tutorials ...

→ same methods for multivariate longitudinal outcomes interface in R(available in Fortran90).

Page 21: LCMM: a R package for the estimation of latent …...LCMM: a R package for the estimation of latent class mixed models for Gaussian, ordinal, curvilinear longitudinal data and/or time-to-event

. . . . . .

. .Introduction

. . . .hlme

. . . . . .lcmm

. . . . .Jointlcmm

. .Conclusion

Aknowledgements + references

Funding : ANR MOBIDYQ [#2010 PRSP 006 01]

+ INCa PREDYC [#2010-059]

References :On joint latent class models and predictive accuracy :

- Commenges, Liquet & Proust-Lima (2012). Biometrics, early view.

- Proust-Lima, Sene, Taylor & Jacqmin-Gadda (2012). Statistical Methodsin Medical Research, early view.

- Proust-Lima & Taylor (2009). Biostatistics, 10, 535-49

On latent process mixed models :

- Proust-Lima, Amieva, Jacqmin-Gadda (2012). paper in revision, availableon request

- Proust-Lima, Dartigues, Jacqmin-Gadda (2011). AJE, 174(9), 1077-88