You are on page 1of 37

Modeling of time-to-event data

Andrew Hooker

Pharmacometrics Research Group


Department of Pharmaceutical Biosciences
Uppsala University
Sweden
What is Time to Event
• The time from entry into a study/start of drug
administration until a subject has a particular
outcome

• A response that most often is binary (event, no


event) but can be categorical (event type 1, event
type 2, no event)

• The response is often referred to as a failure time,


survival time or event time

2
Time to Event Examples
• Time to:
– hospitalization
– discharge from hospitals
– cardiovascular death
– progression (cancer, HIV/AIDS)
– a side effect (e.g. nausea)
– drop-out from study
(often subsetted by reason)

3
Objectives of Time To Event
analysis
• To estimate the impact of predictors on the
time-to-event:
– between two or more groups, such as
treated vs. placebo MI patients in a
randomized controlled trial
– of continuous covariates, such as:
weight, blood pressure, cholesterol or drug

• To create models that can realistically simulate


trials where the endpoint is time-to-event

4
Definitions
• TTE= time to event
the event occurs once per individual

• RTTE= repeated time to event


the event can occur several times per
individual

5
The survival time response
• Usually continuous

• For some subjects, we will know their exact time


of event

• For subjects with no event we only know that


their survival time was at least equal to some time
t=end_of_experiment (right censoring)

• For some subjects we may only know that they


have had an event within an interval of time
(interval censoring)
6
Data Structure: survival analysis
Two-variable outcome (in simplest case):

• Time variable:
ti = time of observation

• Event variable:
DVi =1 if there was an event
DVi =0 if no event by time ti (censored)

7
ID TIM DV
E
TTE data 1 5.2 1
2 10 0

No event,
Right censored
(ti=10, DVi=0)

ID 2

Time to event
(ti=5.2, DVi=1)
End of
1
experiment

5.2 10
time 8
Interval Censoring in ID TIM
E
DV

TTE 1 7.5 1
2 10 0
Potential measurement
times

True, unknown
event time

ID 2

Interval censored Time to event:


(ti=7.5, DVi=1)
1

2.5 5 7.5 10
time 9
ID TIM DV
E
RTTE data 1 5.2 1
1 8 1
No 1st event, 1 10 1
Right censored 2 7.7 1
3 2 10 0
3 10 0

ID 2

No 2nd event,
1 Right censored

5.2 10
time 10
TTE analysis - Definitions
• Survival function= S(t)
– the probability of individual survival beyond
time t
S (t ) = Pr(T > t )
• Cumulative distribution function F(t)
– The probability of individual having an event
before, or at, time t

F (t ) = Pr(T £ t ) = 1 - S (t )
t is some time, T is a random variable denoting the time of event 11
Survival function - S(t)

Three ways to handle S(t):


• Nonparametric
• Kaplan-Meier curves

• Normalisation to reference arm


• Cox proportional hazard

• Parametric
• All components of S(t) model-based

12
Kaplan-Meier curves

% Survival (IDs without an


event) in Data

Parametric confidence
interval

Handles
censoring

13
Kaplan-Meier analysis
Differences tested using the Logrank test

14
Limitations of Kaplan-Meier
• Mainly descriptive

• Cannot be used for simulation

• Covariates are handled by stratification


• may not be suitable for continuous covariate such as age

• Time-varying covariates are not handled


• not be suitable for exposure

15
Models for survival functions
• Often based on the hazard function, h(t)
– The instantaneous rate at which events occur
– The instantaneous risk of demise at time t,
conditional on survival to that time

Pr[(t £ T < t + Dt ) | T ³ t ]
h(t ) = lim
Dt ® 0 Dt

16
Your mortality is a “bathtub
hazard”…

Hazard = f ( sex, race, age,...)

“… a bathtub-shaped hazard is appropriate in populations followed from birth.”


Klein, J.P., and Moeschberger, M.L. 2003. Survival analysis: techniques for censored and truncated data. New York:
Springer-Verlag. http://en.wikipedia.org/wiki/Bathtub_curve “The bathtub curve”.

17
Slide compliments of Nick Holford
With the Hazard we can model all
types of (R)TTE data…
• Probability of surviving beyond a time t
(right censored data, ti=t, DVi =0):

t
S (t ) = exp(- ò h(u ) ¶u )
0

• Probability density function for having an event at


time t (ti=t, DVi =1):

Pr(t £ T < t + Dt )
f (t ) = lim = h(t ) S (t )
Dt ¾¾
®0 Dt

18
With the Hazard we can model all
types of (R)TTE data…(2)
Probability of having an event within ti-1 and ti
(Interval censored data, ti-1≤t≤ti, DVi =1):

Pr(ti -1 < T < ti ) = S (ti -1 ) - S (ti )

For more information please see: Hu and Sale, JPKPD, 2003

19
Relations
f (t ) d S '(t )
Hazard: h(t) = = - ln S (t ) = -
S (t ) dt S (t )
t

ò
( - h ( u ) du ) ¥
Survival S(t) = e 0
= ò f (u )du
t

dS (t ) d
Density f (t ) = h(t ) S (t ) = - = F (t )
dt dt
t
Cumulative Hazard: H (t ) = ò h(u ) du = - log( S (t ))
0 t
Cumulative Distribution function: F (t ) = 1 - S (t ) = ò f (u )du
0
20
Cox proportional hazard model
• Semi-parametric
• Models the effect of predictors and covariates on the hazard
rate but leaves the baseline hazard rate unspecified
• Estimates relative rather than absolute risk

Studied Intensity

Model Parameters

b x1
h1 (t ) h0 (t )e b ( x1 - x2 )
h(t ) = HR = = b x2
= e
h2 (t ) h0 (t )e
Covariates
Relative risk
(Hazard Ratio)
Baseline intensity
21
Cox proportional hazard model
Assumptions:

1. Covariates are independent with respect to time and their


contribution to the hazard are constant over time (this can
be overcome)

2. A log-linear (proportional) relationship between the


independent variables and the underlying hazard function.

Limitation:
Since no baseline is estimated; not suitable for simulation of
new trials

22
Cox proportional hazard model
The log partial likelihood for the Cox PH model for
all event times is expressed as:
7

log 𝐿 𝛽 = ( 𝑋* 𝛽 − 𝑙𝑜𝑔 ( exp 𝑋2 𝛽


89: 2∈56

where N is the number of events in the data set, Xi is


the covariate vector for subject with an event at
time j, Rj is the set of subjects at risk at time j, Xk
is the covariate vector for subject k, 𝛽 is the
covariate coefficient vector

23
Cox proportional hazard model
with the Breslow approximation

If the data set contains ties, i.e. several events at the


same time point,

the log partial likelihood for the Cox PH model with the
Breslow approximation1 should be used:
7

log 𝐿 𝛽 = ( 𝑆* 𝛽 − 𝑑8 𝑙𝑜𝑔 ( exp 𝑋2 𝛽


89: 2∈56

where 𝑆* = ∑*∈>8 𝑋* ; Dj is the set of subjects having an event at


time j and dj is the number of events at time j.
When the number of ties is high, the Efron approximation
should be used2.
1Breslow N. Covariance analysis of censored survival data. Biometrics. 1974 Mar;30(1):89–99 24
2Harrell FE – Regression Modeling Strategies; With applications to linear models, logistic regression and survival analysis. Springer, 2001.
Parametric survival functions
• Give us a model for S(t) to be used for
• Evaluation
• Understanding
• Simulation

• Assumes that the underlying hazard can be


appropriately modeled
• Diagnostics are available to inspect goodness-of-fit and
drive model-building

25
Commonly used (baseline)
Survival distributions
Exponential distribution Weibull distribution

S (t ) = e - lt S (t ) = e - ( l t )a

h(t ) = l h ( t ) = la (lt )a -1

f (t ) = h(t ) × S (t ) = l × e -lt f ( t ) = h ( t ) × S ( t ) = la (lt ) a -1


×e - ( l t )a

H (t ) = - log(S (t )) = lt H ( t ) = - log ( S ( t ) ) = (lt )a

26
Weibull distribution
(2-parameter)

S (t ) = e
Survival function : - ( lt )a

λ= scale parameter
α= shape parameter

– α >1 : hazard increasing with time


– α =1 : hazard constant over time
(Exponential distribution)
– α <1 : hazard decreasing with time
– α = 2: Rayleigh distribution
– α = 3.4: similar to the normal distribution

27
Different Weibull distributions

α λ

28 28
Inclusion of covariates
Covariates can be time varying or constant.
Often modeled as a change in hazard.

h0 ( t ) = la (lt )a -1
Cp
ha (t ) = h0 × (1 - )
Cp + C 50

29
Time varying PK (Cp) versus summary PK variable
(Css,av, Cmax) as predictor of TTE or RTTE

• Time varying PK always theoretically preferred

• Summary PK variables easier implementation and


shorter run times

• Css,ave approach assumes a linear relationship


between plasma concentrations and hazard within
the dosing interval

• Summary PK approach is probably OK in situation


where the PK fluctuations are low

30
Goodness of fit for (R)TTE

1. Residuals

2. Simulation based diagnostics

Note: GOFs can be generated for all individuals, per subgroup


or for a typical patient (e.g. per event for RTTE).

31
Residuals
• Noninformative if few events (rare event)
• Can be difficult to interpret
• Often model dependent

1. Log Interevent time residual (RT)


(only RTTE, only noncensored patients)
2. Deviance residual (RD)
(RTTE & TTE, only noncensored patients)
3. Event free residual (REF)
(RTTE & TTE), censored and noncensored
patients)
Cox et al. J Pharmacokin Biopharm 1999

More details in Extra material 32


Simulation based diagnostics

• Visual Predictive Check using KM plot


– Compare simulated Kaplan-Meier to observed Kaplan-
Meier
– For RTTE, a separate VPC for time to first event, time
to second event, etc.
– Correctly handles censoring

• Number of event in different time intervals

33
TTE VPC plot

Kaplan-Meier plot of data (blue line) and 95% prediction intervals of the Kaplan-Meier
plot (green area, 100 simulations). 34
Interpretation of results
• Median time to event ratio (MR)
− MR=2; i.e. median time to event is twice as high in group A versus
group B
− easy to interpret
− Only looks at median

• Hazard ratio (HR)


− Hazard ratio (HR) = Relative risk rate = hazardA/hazardB
− HR=2; i.e. a patient in group A has twice the chance of getting an
event at the next time point versus someone in group B.
− Benefits of therapy depend not only on the hazard ratio but also
on the size of the hazards and the shape of the underlying
probability distribution (the baseline hazard).

35
Interpretation of HR
The hazard ratio can be misleading if used directly to
assess the amount of treatment benefit.

Weibull distribution Weibull distribution


Median survival time reduced by 10% Median survival time reduced by 50%

Spotswood et al. Antimicrob Agents Chemother 2004 36


Conclusions
• TTE regression can be important in many real life clinical
settings

• Censoring in time to event data needs to be taken into account


when analyzing time to event data.

• Parametric approaches where the baseline hazard is defined


often leads to more insight about the exposure response
relationship.

• Use simulation based diagnostics as a primary tool for GOF.

• Carefully translate the model parameters into useful language


when communicating your results to clinicians and decision
makers.

37

You might also like