23
logo survival analysis prop. hazard model shared frailty model Simulation discussion Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit¨ at Halle-Wittenberg Institut f¨ ur Medizinische Epidemiologie, Biometrie und Informatik 20.11.2009 Katharina Hirsch Frailty-Models 20.11.2009 1 / 23

Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

Procedures for analyzing Frailty-Models in SAS and R

Katharina Hirsch

Martin-Luther-Universitat Halle-WittenbergInstitut fur Medizinische Epidemiologie, Biometrie und Informatik

20.11.2009

Katharina Hirsch Frailty-Models 20.11.2009 1 / 23

Page 2: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

outline

1 survival analysis

2 proportional hazard model

3 shared frailty model

4 Simulation

5 discussion

Katharina Hirsch Frailty-Models 20.11.2009 2 / 23

Page 3: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

survival data

observation of single events

discharge from the hospitaldisruption of materialonset of a disease

analyzing the event time

estimation of the effect of prognostic factors

often censored data:

end of the studylost to follow-upcompeting risk

Katharina Hirsch Frailty-Models 20.11.2009 3 / 23

Page 4: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

proportional hazard model (Cox 1972)

µ(t | X ) = µ0(t)eβ′X

µ0(t) baseline hazard function

β′ = (β1, . . . , βk) vector of regression coefficients

X ′ = (X1, . . . ,Xk) vector of covariables

effect of covariables on the time until the occurrence of an event(regression model)

requirements:

proportional hazardsindependent life times

semiparametric model

Katharina Hirsch Frailty-Models 20.11.2009 4 / 23

Page 5: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

shared frailty model

clustered data

basic idea: extension of the Cox model

event times conditionally independent

Zi = frailty termdescribed unobserved heterogeneity

µij(t,Xij ,Zi ) = Ziµ0(t)eβ′Xij

Katharina Hirsch Frailty-Models 20.11.2009 5 / 23

Page 6: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

shared gamma frailty model

f (z) =bpzp−1e−bz

Γ(p)Z ∼ Γ(p, b)

hazard function

µ(t) =µ0(t)

1 + σ2M0(t)

assumption p = b

EZ = 1, σ2 =1

b

Z ∼ Γ(b, b)

typical assumptions for the parameters

one parametric gamma distribution

Katharina Hirsch Frailty-Models 20.11.2009 6 / 23

Page 7: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

shared log-normal frailty model

Ziµ0(t)eβ′Xij = µ0(t)eβ′Xij+Wi

W ∼ N(0, σ2)

assume a normal distributed random effect W

very flexible

assumption EW = 0

no explicit form of the Likelihood function

numerical methods have to be used

Katharina Hirsch Frailty-Models 20.11.2009 7 / 23

Page 8: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

Procedures for the shared gamma frailty model

name SPGAM1 frailtypenal coxph

software SAS R R

library - Frailtypack Survival

algorithm ML-EM PPL PPL

author Hien Vu Juan R. Gonzalez T. TherneauVirginie Rondeau

Katharina Hirsch Frailty-Models 20.11.2009 8 / 23

Page 9: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

Procedures for the shared log normal frailty model

name SPNL3 coxph coxme phmm

software SAS R R R

library - Survival Kinship Phmm

algorithm ML-EM PPL PPL EMlogN/reml MCMC

author Hien Vu T. Therneau, T. Therneau M. Donohue,C. McGilchrist R. Xu

Katharina Hirsch Frailty-Models 20.11.2009 9 / 23

Page 10: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

Simulation

3 different cluster sizes (10x100, 50x20, 100x10)

total sample size: 1000

3 covariables: x1 (uniform), x2 (normal), x3 (binomial)

β1 = 1β2 = −1β3 = 0.5σ2 = 0.5

gamma and log-normal frailty

3 different baseline hazards

Weibull-distributedGompertz-distributedExponential-distributed

50% and 80% censoring

Katharina Hirsch Frailty-Models 20.11.2009 10 / 23

Page 11: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

analysis of the simulated data

β estimators for Γ distributed frailty with 50% censoring

●●●

●●

●●

●●●

●●

●●●

●●

●●●

●●

●●

●●

●●●

●● ●

● ●

●●●

●●●

●●

●●

●●

●●●

●●●

●●●

●●

●●

●●●●

●●

●●

●● ●

●●●● ●

●●●●●

●● ●

●●●●●

●●●

●●●●●

●●

●●●

●●

● ●

●●

●●

●●

●●

●●●

●●

● ●●●

●●

●●●

●●

●●●

●●

−1.

5−

1.0

−0.

50.

00.

51.

01.

52.

0

(a)

estim

ated

par

amet

ers

coxphfrailtyPenalSPGAM1

ββ1

i ii iii

ββ2

i ii iii

ββ3

i ii iii

Katharina Hirsch Frailty-Models 20.11.2009 11 / 23

Page 12: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

analysis of the simulated data

σ2 estimators for Γ distributed frailty with 50% censoring

●●●●

●●

●●

●●

●●

●●

●●

●●●●●

●●

●●

●●●

●●● ●

●●

●●●●●

●●●

●●●●

●●●

●●●●

●●

0.0

0.5

1.0

1.5

(a)

estim

ated

par

amet

ercoxphfrailtyPenalSPGAM1

i ii iii

Katharina Hirsch Frailty-Models 20.11.2009 12 / 23

Page 13: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

analysis of the simulated data

β estimators for Γ distributed frailty with 80% censoring

●●

●●●●

●●

●●

●●●

●●●

●●

●●●

●●

●●●

●●●

●●●

●●

●●● ●

●●●●

●●

●●●●

●●●

● ●●●

●●

●●

●●

●●●●

●●

●●●●

●●●

●●

●●●

●●●●●

●●

●●●

●●●●●

●●

●●●

●●●●●

●●

●●●●●●

●●

●●●

●●●●

●●●●●

●●●●

● ●●●●

●●●

●●●●●●

●●

● ●●●●

●●●

●●

−1

01

2

(b)

estim

ated

par

amet

ers

coxphfrailtyPenalSPGAM1

ββ1

i ii iiiββ2

i ii iii

ββ3

i ii iii

Katharina Hirsch Frailty-Models 20.11.2009 13 / 23

Page 14: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

analysis of the simulated data

σ2 estimators for Γ distributed frailty with 80% censoring

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●●

●●●●

●●

●●●

●●●

●●●●

●●

●●●

●●●

●●

●●

●●

●●

●●

●●●

●●●

●●

0.0

0.5

1.0

1.5

2.0

(b)

estim

ated

par

amet

ercoxphfrailtyPenalSPGAM1

i ii iii

Katharina Hirsch Frailty-Models 20.11.2009 14 / 23

Page 15: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

analysis of the simulated data

β estimators for lognormal distributed frailty with 50% censoring

●●●●●

●●

●●●●●

●●

●●●●●

●●

●●●●●

●●

●●●●●

●●

●●●●●

●●

●●●●●

●●

●●●●●

●●

●●

●●●●

●●●●

●●●●

●●●●

●●●

●●

●●●

●●

●●

●●

●●●

●●

●●●

●●

●●●

●●

●●●

●●

●●●

●●●●

●●●●

●●●●

●●●●

●●

●●●

●●

●●●

●●

●●●

●●

●●●

●●

●● ●

●●

●● ●

●●

●● ●

●●

●●

●●

●●●●●

●●

●●●

●●●●●●

●●

●●●

●●●●●

●●

●●●

●●●●●●

●●

● ●

●●●

●●

●●●

●●

●●●

●●

●●●

●●

−1.

5−

1.0

−0.

50.

00.

51.

01.

5

(a)

estim

ated

par

amet

ers

coxphcoxmephmmSPLN3

ββ1

i ii iii

ββ2

i ii iii

ββ3

i ii iii

Katharina Hirsch Frailty-Models 20.11.2009 15 / 23

Page 16: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

analysis of the simulated data

σ2 estimators for lognormal distributed frailty with 50% censoring

●●●●

●●●

●●●

●●●●

●●●

●●●●

●●●●

●●●

●●●

●●

●●

●●●●

●●●

●●●●

●●● ●

●●●●

●●●

●●●●

●●●

●●●●●

●●●●●

●●●●●

●●●●●

●●

●●●●●

●●●●●

●●

●●●●●

●●●●●

●●

0.0

0.5

1.0

1.5

(a)

estim

ated

par

amet

ercoxphcoxmephmmSPNL3

i ii iii

Katharina Hirsch Frailty-Models 20.11.2009 16 / 23

Page 17: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

analysis of the simulated data

β estimators for lognormal distributed frailty with 80% censoring

●●●

●●

●●●

●●

●●●

●●

●●●

● ●●●●●

●●●●●

●●●●●

●●

●●●●●

●●

●●●●

●●●● ●●●●

●●●● ●●●●

●●●● ●●●●

●●●● ●● ●● ●● ●● ●●

●●●

●● ●●

●●●

●● ●●

●●●

●●

●●

●●●

●●

●●●

●●●

●●●

●●●

●●●

●●

●●

●●●

●●

●●

●●●

●●

●●●

●●●

●●

●●

−1

01

2

(b)

estim

ated

par

amet

ers

coxphcoxmephmmSPLN3

ββ1

i ii iii

ββ2

i ii iii

ββ3

i ii iii

Katharina Hirsch Frailty-Models 20.11.2009 17 / 23

Page 18: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

analysis of the simulated data

σ2 estimators for lognormal distributed frailty with 80% censoring

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●●

●●

●●●●

●● ●

●●●

●●

●●●●●

●●

●●●●

●●

●●●

●●●●●

●●●●

●●

●●●●

●●●

●●●

●●

●●●●●

●●●●

●●

●0.0

0.5

1.0

1.5

2.0

2.5

(b)

estim

ated

par

amet

ercoxphcoxmephmmSPNL3

i ii iii

Katharina Hirsch Frailty-Models 20.11.2009 18 / 23

Page 19: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

discussion

easy to handle

all procedures are suitable

close estimation for β

just the SAS macros provides an estimation for the SE for Var(Z)

Katharina Hirsch Frailty-Models 20.11.2009 19 / 23

Page 20: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

discussion

SPGAM1 frailtypenal coxph

one distribution three distributions

definition of control parameters

long runtime low runtime

alternative to coxph not adequate preferable

Katharina Hirsch Frailty-Models 20.11.2009 20 / 23

Page 21: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

discussion

SPNL3 coxph coxme phmm

one distribution three distributions one distribution

definition of control parameters

long runtime low runtime long runtime

less adequate less adequate preferable less adequate

Katharina Hirsch Frailty-Models 20.11.2009 21 / 23

Page 22: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

Literature

D.R. Cox: Regression models and life tables. Journal of the RoyalStatistical Society 34, 187 – 202, 1972.L. Duchateau, P. Janssen: The Frailty Model. Springer New York, 2008.H. T. V. Vu und M. W. Knuiman: A hybrid ML-EM algorithm forcalculation of maximum likelihood estimates in semiparametric shared frailtymodels. Computational Statistics & Data Analysis, 40(1), 173 – 187, 2002.H. Vu, M. Segal, M. Knuiman and I. James: Asymptotic and smallsample statistical properties of random frailty variance estimates for sharedgamma frailty models. Communication in Statistics: Simulation andComputation30(3), 581 – 595, 2001.V. Rondeau and J. R. Gonzalez: frailtypack:A computer program for theanalysis of correlated failure time data using penalized likelihood estimation.Computer Methods and Programs in Biomedicine 80, 154 – 164, 2005.G. Kauermann and R. Xu and F. Vaida: Stacked Laplace-EMalgorithm for duration models with time-varying and random effects.Computational Statistics and Data Analysis 52, 2514 – 2528, 2008.R Development Core Team: The R project for statistical computing.URL: http://www.r-project.org, 2008.

Katharina Hirsch Frailty-Models 20.11.2009 22 / 23

Page 23: Procedures for analyzing Frailty-Models in SAS and R · 2010-01-31 · Procedures for analyzing Frailty-Models in SAS and R Katharina Hirsch Martin-Luther-Universit at Halle-Wittenberg

logo

survival analysis prop. hazard model shared frailty model Simulation discussion

Thank you for your attention!

Katharina Hirsch Frailty-Models 20.11.2009 23 / 23