0% found this document useful (0 votes)
35 views

Survival Competing Risk

Uploaded by

drwinkhaing
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Survival Competing Risk

Uploaded by

drwinkhaing
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Survival analysis with competing risks

Janne Pitkäniemi

Finnish Cancer Registry

Tampere University

Statistical Practice in Epidemiology (2024, Lyon)

1 / 29
Points to be covered

1. Survival or time to event data & censoring.

2. Competing risks: event-specic cumulative incidences & hazards.

3. KaplanMeier and AalenJohansen estimators.

4. Regression modelling of hazards: Cox model.

5. Packages survival, mstate, Epi,(cmprisk).


6. Functions Surv(), survfit(), plot.survfit(), coxph().

2 / 29
Survival time  time to event

Time spent (lex.dur) in a given state (lex.Cst) from its beginning till a
certain endpoint or outcome event (lex.Xst) or transition occurs, changing the
state to another.

Examples of such times and outcome events:

▶ lifetime: birth → death,

▶ duration of marriage: wedding → divorce,

▶ healthy exposure time:


start of exposure → onset of disease,

▶ clinical survival time:


diagnosis of a disease → death.

3 / 29
Ex. Survival of 338 oral cancer patients

Important variables:

▶ time = duration of patientship from


diagnosis ( entry) till death (death) or censoring (Alive), (lex.Cst is
(Alive))

▶ event = indicator for the outcome and its


observation at the end of follow-up ( exit):
0 = censoring,
1 = death from oral cancer

Special features:

▶ Two possible endpoints

▶ Censoring  incomplete observation of the survival time.

4 / 29
Set-up of classical survival analysis

▶ Two-state model: only one type of event changes the initial state.

▶ Major applications: analysis of lifetimes since birth and of survival times


since diagnosis of a disease until death from any cause.

Transition
Alive Dead
-
(lex.Xst = 1 or 2)

▶ Censoring: Death and nal lifetime not observed for some subjects due to
emigration or closing the follow-up while they are still alive

5 / 29
Distribution concepts: hazard function

The hazard rate or intensity function λ(t )

( < T ≤ t + ∆|T > t )


P t
λ(t ) = lim ,
∆→0 ∆

▶ the conditional probability that the event occurs in a short interval


(t , t + ∆], given that it does not occur before t , divided by interval length
which gets smaller ∆
During a short interval

risk of event ≈ hazard × interval length

6 / 29
Distribution concepts: survival and cumulative hazard functions

Survival function
( ) = P (T > t ),
S t

= probability of avoiding the event at least up to t (the event occurs only after t ).

The cumulative hazard (or integrated intensity):


Z t
Λ(t ) = λ(u )du
0

one to one connections between the functions, cumulative incidence function, survival
and cumulative hazard:
F (t ) = 1 − S (t )
S (t ) = exp{−Λ(t )}
7 / 29
Observed data on survival times

For individuals i = 1, . . . , n let


T i = time to outcome event,
U i = time to censoring.

Censoring is assumed noninformative, i.e. independent from occurrence of


events.
We observe

y i = min{Ti , Ui }, i.e. the exit time, and

δi = 1{T <U } ,
i i
indicator (1/0) for the outcome event occurring rst, before
censoring.

Censoring must properly be taken into account in the statistical analysis.

8 / 29
Approaches for analysing survival time

▶ Parametric model (like Weibull, gamma, etc.) on hazard rate λ(t ) →


Likelihood:

n
Y
L = λ(yi )δ S (yi )
i

i =1

▶ Piecewise constant rate model on λ(t )


 see Bendix's lecture on time-splitting (Poisson likelihood).

▶ Non-parametric methods, like


KaplanMeier (KM) estimator of survival curve S (t ) and Cox proportional
hazards model on λ(t ).

9 / 29
R package survival
Tools for analysis with one outcome event.
▶ Surv(time, event) -> sobj
creates a survival object sobj assuming that all start at 0, containing pairs (y , δ ),
i i

▶ Surv(entry, exit, event) -> sobj2


creates a survival object from entry and exit times,
▶ survfit(sobj ~ x) -> sfo
creates a survt object sfo containing KM or other non-parametric estimates (also from
a tted Cox model),
▶ plot(sfo), plotCIF(sobj)
plot method for survival curves and related graphs,
▶ coxph(sobj ~ x1 + x2)
ts a Cox model with covariates x1 and x2.
▶ survreg()  parametric survival models.
10 / 29
Ex. Oral cancer data (cont'd)
> suob <- Surv(orca$time, 1*(orca$event > 0) )
> suob[1:7] # + indicates censored observation
[1] 5.081+ 0.419 7.915 2.480 2.500 0.167 5.925+
> km1 <- survfit( suob ~ 1, data = orca)
> km1 # brief summary
Call: survfit(formula = suob ~ 1, data = orca)

n events median 0.95LCL 0.95UCL


[1,] 338 229 5.42 4.33 6.92
> summary(km1) # detailed KM-estimate
Call: survfit(formula = suob ~ 1, data = orca)

time n.risk n.event survival std.err lower 95% CI upper 95% CI


0.085 338 2 0.9941 0.00417 0.9859 1.000
0.162 336 2 0.9882 0.00588 0.9767 1.000
0.167 334 4 0.9763 0.00827 0.9603 0.993
0.170 330 2 0.9704 0.00922 0.9525 0.989
0.246 328 1 0.9675 0.00965 0.9487 0.987
0.249 327 1 0.9645 0.01007 0.9450 0.984
0.252 326 3 0.9556 0.01120 0.9339 0.978
0.329 323 1 0.9527 0.01155 0.9303 0.976
0.334 322 1 0.9497 0.01189 0.9267 0.973
0.413 321 1 0.9467 0.01221 0.9231 0.971 11 / 29
Oral cancer: Kaplan-Meier estimates

1.0 Estimated survival (95% CI)

KM for S(t) Female


0.8

Male
Proportion

0.6
0.4
0.2
0.0

0 5 10 15 20

Time since diagnosis (years)

12 / 29
Competing risks model: causes of death
▶ Often the interest is focused on the risk or hazard of dying from one specic
cause.

▶ That cause may eventually not be realized, because a competing cause of


death hits rst.

λ1 (t )

1 Dead from cancer
 (lex.Xst = 1)
(lex.Cst = 0)  
Alive
(lex.Xst = 0) PP
PP
PP
q Dead, other causes
λ2 (t ) (lex.Xst = 2)

▶ Generalizes to several competing causes.


13 / 29
Competing events & competing risks

In many epidemiological and clinical contexts there are competing events that
may occur before the target event and remove the person from the population at
risk for the event, e.g.

▶ target event : occurrence of endometrial cancer, competing events :


hysterectomy or death.

▶ target event : relapse of a disease (ending the state of remission),


competing event : death while still in remission.

▶ target event : divorce,


competing event : death of either spouse.

14 / 29
Event-specic quantities

Cumulative incidence function (CIF) or

Fc (t ) = (
P T ≤t and C = c ), c = 1, 2,

From these one can recover


P
( )=
F t
c Fc (t ), CDF of event-free survival time T , i.e. cumulative risk of
any event by t .

▶ ( ) = 1 − F (t ), event-free survival function,


S t i.e. probability of avoiding
̸= F1 (t ) + F2 (t )
all events by t , but S (t )

We have lost one-to-one connection between cause-specic hazards and


cumulative incidence (earlier slide).

15 / 29
Event-specic quantities (cont'd)

Event- or cause-specic hazard function


P t( <T ≤t +∆ and C = c | T > t)
λc (t ) = lim
∆→0 ∆
f c (t )
=
1 − F (t )

CIF = risk of event c over risk period [0, t ] in the presence of competing risks,
also obtained Z t
F c (t ) = λc (v )S (v )dv , c = 1, 2,
0

More on the technical denitions of relevant quantities:


http://bendixcarstensen.com/AdvCoh/papers/fundamentals.pdf

16 / 29
Warning of net risk and cause-specic survival

▶ The  net risk  of outcome c by time t , assuming hypothetical elimination


of competing risks, is often dened as

F1 (t ) = 1 − S1∗ (t ) = 1 − exp{−Λ1 (t )} =
̸ S (t )

▶ ∗
In clinical survival studies, function S1 (t ) is often called  cause-specic
survival , or  net survival 
▶ ∗ ∗
Yet, these *-functions, F1 (t ) and S1 (t ), lack proper probability
interpretation when competing risks exist.

▶ Hence, their use should be viewed critically (Andersen & Keiding, Stat Med,
2012)

17 / 29
Analysis with competing events

Let Ui = censoring time, Ti = time to rst event, and


C i = variable for event 1 or 2. We observe

▶ yi = min{Ti , Ui }, i.e. the exit time, and


▶ δic = 1{T <U & C =c } , indicator (1/0) for
i i i

event c being rst observed, c = 1, 2.

Non-parametric estimation of CIF

▶ Let t1 < t2 < · · · < tK be the K distinct time points at which any outcome
event was observed,

▶ Aalen-Johansen estimator (AJ) for the cumulative incidence function


F (t ) should be used

18 / 29
R tools for competing risks analysis

▶ survfit( Surv(...,type="mstate") ) in Survival-package can be tted


for any transition of a multistate model and to obtain A-J estimates.

▶ Package cmprsk  cuminc(ftime, fstatus, ...) computes


CIF-estimates, and can be compared in more than two samples.
plot.cuminc() plots them.

▶ Package Epi  Lexis tools for multistate analyses


Will be advertised by Bendix!

19 / 29
Box diagram for transitions
NOTE: entry.status has been set to "Alive" for all.
NOTE: entry is assumed to be 0 on the stime timescale.

Alive
1,913.7
122

107
Oral ca. death

Other death

20 / 29
Ex. Survival from oral cancer
▶ AJ-estimates of CIFs (solid) for both causes.
▶ Naive KM-estimates of CIF (dashed) > AJ-estimates
▶ CIF curves may also be stacked (right).
CIF for cancer death CIF for other deaths Stacked CIF
1.0

1.0

1.0
A−J
KM
Alive 0.22
0.8

0.8

0.8
0.6

0.6

0.6
Cumulative incidence

Cumulative incidence

Cumulative incidence
Other death 0.38
0.4

0.4

0.4
0.2

0.2

0.2
Oral ca death 0.4
0.0

0.0

0.0
0 5 10 15 20 0 5 10 15 20 0 5 10 15 20

21 / 29
Time Time Time
Ex. CIFs by cause in men and women
0.6 CIF for cancer death CIF for other death

0.6
0.5

0.5
0.4

0.4
Cumulative incidence

Cumulative incidence
0.3

0.3
0.2

0.2
0.1

0.1
0.0

0 5 10 15 20 0.0 0 5 10 15 20

Time Time

CIF for cancer higher in women (chance?) but for other causes higher in men (no
surprise).
22 / 29
Regression models for time-to-event data

Regression models for hazards can be dened e.g. for

(a) hazards, multiplicatively:

λi (t ) = λ0 (t ; α)r (ηi ), where

λ0 (t ; α) = baseline hazard and


r(ηi ) = relative rate function, typically exp(ηi )
(b) hazards, additively:
λi (t ) = λ0 (t ; α) + ηi .

23 / 29
Relative hazards model or Cox model

In model (b), the baseline hazard λ0 (t , α) may be given a parametric form (e.g.
Weibull) or a piecewise constant rate (exponential) structure.

Often a parameter-free form λ0 (t ) is assumed. Then

λi (t ) = λ0 (t ) exp(η1 ),

species the Cox model or the semiparametric proportional hazards


model. ηi = β1 xi 1 + · · · + βp xip not depending on time.

Generalizations: time-dependent covariates xij (t )

24 / 29
PH model: interpretation of parameters

Present the model explicitly in terms of x 's and β 's.

λi (t ) = λ0 (t ) exp(β1 xi 1 + · · · + βp xip )

Consider two individuals, i and i , having the same values of all other covariates
th
except the j one.

The ratio of hazards is constant:

λi (t ) exp(ηi )
= = exp{βj (xij − xi ′ j )}.
λi ′ ( t ) exp(ηi ′ )

Thus e
βj
= HRj = hazard ratio or relative rate associated with a unit change in
covariate Xj .

25 / 29
Ex. Total mortality of oral ca. patients
Fitting Cox models with sex and sex + age.

> cm0 <- coxph( suob ~ sex, data = orca)


> ci.exp(cm0)
exp(Est.) 2.5% 97.5%
sexMale 1.134004 0.8724905 1.473902
Total mortality in males is 13% higher in male than females, but not signicant.
> cm0 <- coxph( suob ~ age+sex, data = orca)
> ci.exp(cm0)
exp(Est.) 2.5% 97.5%
age 1.041914 1.030655 1.053296
sexMale 1.494305 1.139254 1.960009
The M/F contrast visible only after age-adjustment.(49% higher in males).
26 / 29
Predictions from the Cox model

▶ Individual survival times cannot be predicted but ind'l survival curves can.
PH model implies:

exp(β1 x 1 +...+β x )
i (t ) = [S0 (t )] i p ip
S

▶ Having estimated β by partial likelihood, the baseline S0 (t ) is estimated by


Breslow method

▶ From these, a survival curve for an individual with given covariate values is
predicted.

▶ In R: pred <- survfit(mod, newdata=...) and plot(pred), where


mod is the tted coxph object, and newdata species the covariate values.
newdata is always needed for predictions.

27 / 29
Modelling with competing risks

Main options, providing answers to dierent questions.

(a) Cox model for event-specic hazards λc (t ) = fc (t )/[1 − F (t )], when e.g.
the interest is in the biological eect of the prognostic factors on the fatality
of the very disease that often leads to the relevant outcome.

(b) FineGray model for the hazard of the subdistribution


γc (t ) = fc (t )/[1 − Fc (t )] when we want to assess the impact of the factors
on the overall cumulative incidence of event c .
 Function crr() in package cmprsk.

28 / 29
SMR

Relate population mortality to the mortality of your "exposed" cohort

Let

▶ λ( a) be the mortality in the cohort


▶ λP (a) be the population mortality
▶ λE (a) be the excess hazard of dying from the disease among cohort members

▶ SMR is the relative mortality in the cohort

λ(a) = λE (a) + λP (a) (excess mortality)

λ(a) = SMR × λP (a) (standardized mortality ratio)

29 / 29

You might also like