Sie sind auf Seite 1von 110

ST3054 Introduction to Survival Methods

Duration 12 Weeks (Period 1: Sep - Dec)



Lectures:
Tue 2pm - 3pm WGB G-15
Fri 11am - 12pm WGB G-13

Tutorials:
Mon 10am 11am WGB G-34

Practicals:
TBC

Textbook: CT4 Notes from Institute of Actuaries (contact SOMS office).

Module Objective To provide an understanding of the methods of survival analysis. Prepare for
relevant portion of CT4 exam.

Assessment Method for Module ST3054
% of Total Mark
Two homework assignments 20%

End of Year Examination May 80%

Attendance: Attendance at every component of this module is compulsory. Rolls will be taken at
randomly chosen lectures. Note the following extract from the college calendar which can be found at:
http://www.ucc.ie/acad/calendar/general/info014.html
Every student registered for a diploma or degree is expected to attend all lectures, tutorials, laboratory
classes etc. In the case of absence through illness, a student must, if possible, give notice of each
absence in writing to the Lecturer concerned and/or Head of Department responsible. In the case of
such absence for more than four lecture days the student must, on resuming attendance, notify the
Lecturer concerned and/or Head of Department in writing and, if required by the Lecturer and/or Head
of Department to do so, lodge a medical certificate with the Head of Department, who in turn will send
a copy to the Student Records and Examinations.
A student will not be permitted to enter for an examination at the conclusion of a module if attendance
at that module is not considered satisfactory by the Registrar and Vice-President for Academic Affairs
following a report by the Lecturer concerned and/or Head of Department responsible for the module.
The decision of the Registrar and Vice-President for Academic Affairs is subject to the appeal of the
Academic Council of the University.

Syllabus (from CT4 notes 2012):
Ch7: Survival models and the life table
Ch8: Estimating the lifetime distribution function: Kaplan-Meier and Nelson-Aalen
Ch9: The Cox regression model



Introduction
Survival models
Lifetime distribution functions
Cox regression
ST3054 - Survival Analysis
Eric Wolsztynski
eric.w@ucc.ie
Department of Statistics
School of Mathematical Sciences
University College Cork, Ireland
2013-2014
Version 1.0
Introduction
Survival models
Lifetime distribution functions
Cox regression
Acknowledgment
These lecture notes follow and adapt a section of the Institute and
Faculty of Actuaries CT4 notes, in respect of the exemption
programme in place for ST3054. However this document does not
reproduce the CT4 notes fully nor exactly, and also contains
information and examples not found in those notes.
These notes also use a large part of former ST3054 notes written
by Dr Kingshuk Roy Choudhury and Dr Tony Fitzgerald for a
previous course syllabus.
For any comment or query about this document, please contact
eric.w@ucc.ie
ST3054 2
Introduction
Survival models
Lifetime distribution functions
Cox regression
Timetable and assesment

ST3054 is taught in Period 1


Lectures / Tutorials: Tuesdays 2-3pm in G15
Fridays 11am-12pm in G13
Tutorials / Practicals: Monday 10-11am in lab G34

Continuous assesment: 2 home assignments (10 marks each)

90-minute end-of-year exam


ST3054 3
Introduction
Survival models
Lifetime distribution functions
Cox regression
Module objective and content

Module Objective:
To develop techniques for the analysis of survival data

Module Content:
1) Parametric models of survival, use of life tables, types of
censoring, hazard functions
2) Non-parametric estimation of hazard and survival functions,
Kaplan-Meier and Nelson-Aalen estimators
3) Proportional hazards model with covariates

Use of software
ST3054 4
Introduction
Survival models
Lifetime distribution functions
Cox regression
Learning Outcomes

Explain the concept of a survival model and be able to


describe the more commonly used mortality / survival
functions and apply these to solve practical problems

Dene the distribution and density functions of the random


future lifetime, the survival function, the force of mortality
and derive relationships between them

State the Gompertz and Makeham laws of mortality and be


able to apply both to solve practical problems

Describe various ways in which lifetime data might be


censored and be able to describe the various problems
introduced by censoring
ST3054 5
Introduction
Survival models
Lifetime distribution functions
Cox regression
Learning Outcomes

Describe both the Kaplan-Meier and Nelson-Aalen estimate of


the survival function in the presence of censoring, explain how
it arises as a maximum likelihood estimate, compute it from
typical data and estimate its variance

Describe the Cox model for proportional hazards, derive the


partial likelihood estimate in the absence of ties, and state its
asymptotic distribution

Interpret the eect of covariates on the hazard of a population


at risk in the Cox proportional hazards model

Explain and apply the concept of proportional hazards model


selection using likelihood ratio tests
ST3054 6
Introduction
Survival models
Lifetime distribution functions
Cox regression
Related material

Pre-requisite: ST2053, ST2054

Co-requisite: ST3053

Textbook: CT4 Notes from Institute and Faculty of Actuaries


- Contact Damian or Linda
- Before the end of September

ST3054 syllabus also connects with ST3074

ST3054 used to include IFA CT4 content:


Ch4 The two-state Markov model
Ch10 The Binomial and Poisson models
ST3054 7
Introduction
Survival models
Lifetime distribution functions
Cox regression
Outline
I Introduction
II Survival models (Ch7 of CT4 notes 2013)
III Lifetime distribution functions (Ch8 of CT4)
IV The Cox regression model (Ch9 of CT4)
ST3054 8
Introduction
Survival models
Lifetime distribution functions
Cox regression
Introduction
ST3054 9
Introduction
Survival models
Lifetime distribution functions
Cox regression
Demography & public health

How long will we live?

Do men live longer than women?

How do lifestyle factors aect your lifespan?

How long will our children live?

Which people have the longest lifespan?

What implications does an increasing lifespan have?


ST3054 10
Introduction
Survival models
Lifetime distribution functions
Cox regression
Life expectancy in Ireland
http://www.cso.ie/Quicktables/GetQuickTables.aspx?FileName=VSA30.
asp&TableName=Life+Expectancy&StatisticalProduct=DB_VS
(CSO QuickTables - VSA30 - Life Expectancy)
At Age 0 10 20 35 55 65 75
1926 57.4 55.2 46.4 34.4 19.1 12.8 7.7
2006 76.8 67.2 57.5 43.3 24.8 16.6 9.8
Table: Life expectancy (Males)
At Age 0 10 20 35 55 65 75
1926 57.9 54.9 46.4 34.7 19.6 13.4 8.4
2006 81.6 72.0 62.1 47.4 28.5 19.8 12.1
Table: Life expectancy (Females)
ST3054 11
Introduction
Survival models
Lifetime distribution functions
Cox regression
Life expectancy worldwide
https://www.cia.gov/library/publications/the-world-factbook/rankorder/
2102rank.html (CIA World Factbook: Country Comparison :: Life expectancy at birth)
Rank Country L.E.
1 Monaco 89.68
2 Macau 84.43
3 Japan 83.91
4 Singapore 83.75
5 San Marino 83.07
6 Andorra 82.50
7 Guernsey 82.24
8 Hong Kong 82.12
9 Australia 81.90
10 Italy 81.86
Rank Country L.E.
212 Mozambique 52.02
213 Lesotho 51.86
214 Zimbabwe 51.82
215 Somalia 50.80
216 Central Afr. Rep. 50.48
217 Afghanistan 49.72
218 Swaziland 49.42
219 South Africa 49.41
220 Guinea-Bissau 49.11
221 Chad 48.69
ST3054 12
Introduction
Survival models
Lifetime distribution functions
Cox regression
Lifestyle factors
ST3054 13
Introduction
Survival models
Lifetime distribution functions
Cox regression
Insurance & pension

Insurance: pay a lump sum on death

Pension: pay an annuity (xed amount) till death

Times (& cost) of payment are dependent on human lifetimes

Calculation of expected cashow depends on distribution of


human lifetime

Study of distribution of lifetimes is called survival analysis


ST3054 14
Introduction
Survival models
Lifetime distribution functions
Cox regression
Machine reliability

Air conditioner, working at high temp

Begins working at time t = 0

S(t) = P(AC functioning at future time t)

S(t) = survival probability function

T = future lifetime (failure time)

S(t) = P(T > t) = 1 F


T
(t)

Machines are not humans: dierent models are needed


ST3054 15
Introduction
Survival models
Lifetime distribution functions
Cox regression
Biostatistics (clinical studies)

Is a new drug for cancer more eective?

t = 0 is date of diagnosis / injection

S(t) = P(Alive at future time t)

S(t) can be used to judge ecacy of new treatments,


indicators

Regression with S(t) as response


ST3054 16
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistics in survival analysis

Estimating the survival function

Modelling dependence of the survival function on covariates

Predicting survival

Estimating signicance / standard errors


ST3054 17
Introduction
Survival models
Lifetime distribution functions
Cox regression
Types of data

Actuarial and demographic studies deal with large samples

Clinical studies deal with smaller samples

Actuarial and demographic studies are generally


cross-sectional (or transversal ) studies:
- observation of a population/sample at one point in time
- aim to provide data on the whole population

Clinical studies are generally longitudinal:


- observations are repeated on the same individuals over
periods of time
ST3054 18
Introduction
Survival models
Lifetime distribution functions
Cox regression
Aggregate model

Consider S(t) where t = 0 denotes time of birth

X (age at death)
?
= T (time of death)

x = attained age

Survival function S(x) = S(t)

When survival is not dependent on age, use S(t)

If age is important, use S


x
(t)
ST3054 19
Introduction
Survival models
Lifetime distribution functions
Cox regression
Select model

Person opting for insurance, age x

Want to nd S(t)

S
x
(10) is dierent if x = 25 than if x = 55

Survival function is really S(t, x)

x is a concomitant variable, or covariate

Other variables also aect S(t)

Study the eect of other variables on S(t)

Actuarial method: study S


x
(t)
ST3054 20
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Section I
Survival models
ST3054 21
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
I.1 Simple survival models
ST3054 22
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
A simple survival model

We consider a rst model of random lifetimes

The future lifetime of an individual is treated as a continuous


random variable

Model already provides a set of fundamental tools for the


analysis of human mortality
ST3054 23
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Future lifetime

The lifetime of a person (or life) is not known in advance

Lifetimes (random variables) range from 0 to over 100 years

Let denote the limiting age (maximum age)


Assumption: the future lifetime of a new-born person, denoted T,
is a random variable continuously distributed on an interval [0, ]
where 0 < <

In practice we have typically [100, 120]

For simplicity, the possibility that an age surpasses is


conveniently excluded
ST3054 24
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Future lifetime
Denition:
F(t) = P(T t) is the distribution function of T
S(t) = P(T > t) = 1 F(t) is the survival function of T

S(t) is the probability of a new-born surviving to age t

Let T
x
be the future lifetime after age x, of a life who
survives to age x, with 0 x and T
0
= T
Denition (0 x ):
F
x
(t) = P(T
x
t) is the distribution function of T
x
S
x
(t) = P(T
x
> t) = 1 F
x
(t) is the survival function of T
x
ST3054 25
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Future lifetime
Examples:

F
30
(50) denotes the probability that a 30-year old dies before
his/her 80th birthday

S
25
(32) represents the probability that a 25-year old survives
at least another 32 years
For consistency with T, the distribution function of the random
variable T
x
must satisfy the following:
F
x
(t) = P(T
x
t)
= P(T x + t|T > x)
=
F(x + t) F(x)
S(x)
ST3054 26
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Probabilities of death and survival
Actuarial notation for death and survival probabilities:
t
q
x
probability that someone aged x dies with t years
q
x
probability that someone aged x dies within 1 year
t
p
x
probability that someone aged x is still alive after t years
p
x
probability that someone aged x is still alive after 1 year
In particular we have
t
q
x
= F
x
(t)
t
p
x
= 1
t
q
x
= S
x
(t)
ST3054 27
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Survival probabilities: example 1
Age x l
x
d
x
p
x
q
x
90 9,253 2,035 0.78006 0.21994
91 7,218 1,711 0.76297 0.23703
92 5,507 1,403 0.74515 0.25485
93 4,104 1,122 0.72659 0.27341
94 2,982 873 0.70730 0.29270
95 2,109 660 0.68728 0.31272
96 1,449 483 0.66652 0.33348
97 966 343 0.64503 0.35497
98 623 235 0.62281 0.37719
99 388 155 0.59985 0.40015
Table: Irish Life Table No. 14 2001-2003 (Males)
Probability that a 90 year old man survives to 95, i.e.
5
p
90
?
ST3054 28
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Survival probabilities: example 1
For a 90 year old man to survive to 95 he must
Event Probability
survive from 90 to 91
1
p
90
= 0.78006
survive from 91 to 92
1
p
91
= 0.76297
survive from 92 to 93 p
92
= 0.74515
survive from 93 to 94 p
93
= 0.72659
survive from 94 to 95 p
94
= 0.70730
Thus
5
p
90
=
1
p
90

1
p
91

1
p
92

1
p
93

1
p
94
= 0.2278
ST3054 29
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Factoring survival probabilities
5
p
90
= P(90 year old man will survive to 95)
5
p
90
=
1
p
90

1
p
91

1
p
92

1
p
93

1
p
94
5
p
90
= (
1
p
90

1
p
91

1
p
92
) (
1
p
93

1
p
94
) =
3
p
90

2
p
93
5
p
90
= (
1
p
90

1
p
91
) (
1
p
92

1
p
93

1
p
94
) =
2
p
90

3
p
92
s+t
p
x
=
s
p
x

t
p
x+s
s+t
p
x
=
t
p
x

s
p
x+t
ST3054 30
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Survival probabilities: example 2
Question: which is bigger,
5
p
34
or
7
p
33
?
ST3054 31
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Relating conditional and aggregate survival probabilities

Person opting for insurance, age x

Survival function is really S(t, x)

Actuarial method: study S


x
(t) = S(t, x)

S
x
(t) is the (select) survival function for the r.v. T
x

T
x
is the future (select) lifetime after age x

T = T
0
is called the aggregate lifetime
ST3054 32
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Relating conditional and aggregate survival probabilities
S
x
(t) = probability someone aged x survives for t years or more
= probability someone survives to age x + t given that
they have already survived to age x
= P(T
x
> t) = P(T > x + t|T > x)
=
P(T > x + t and T > x)
P(T > x)
=
S(x + t)
S(x)
Equivalently,
t
p
x
=
x+t
p
0
x
p
0
ST3054 33
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Relating conditional and aggregate survival probabilities
From this relationship
t
p
x
=
x+t
p
0
x
p
0
we may thus also derive
s+t
p
x
=
x+s+t
p
0
x
p
0
=
x+s
p
0
x
p
0
x+s+t
p
0
x+s
p
0
=
s
p
x

t
p
x+s
Similary,
s+t
p
x
=
t
p
x

s
p
x+t
(i.e. the result seen previously on factoring survival probabilities)
ST3054 34
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The distribution of mortality (age at death)
SDF: S(x) = 1 F(x) = P(t > x)
PDF: f (x) = dF(x)/dx = dS(x)/dx (unconditional)
f (x) = lim
h0
+
1
h
[F(x +h) F(x)] = lim
h0
+
1
h
P(x < T x +h)
Figure: Distribution of the random variable T: number of deaths vs age
ST3054 35
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The force of mortality
x
Denition: the force of mortality
x
at age x (0 x ) is

x
= lim
h0
+
1
h
P (T x + h|T > x)

This limit is always assumed to exist


x
is an instantaneous measure of mortality at age x, or the
conditional instantaneous failure rate given survival to time x

It is the continuous equivalent of q


x

Statisticians call it the hazard rate function


ST3054 36
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The force of mortality
x
Intuitively, the force of mortality may be seen as the probability of
instant death for an individual aged x.
The probability P (T x + h|T > x) is F
x
(h) =
h
q
x
.
For small h, we can ignore the limit and write
h
q
x
h
x
This means that the probability of death in a short time h after
age x is roughly proportional to h. Moreover, the constant of
proportionality for this relationship is
x
.
ST3054 37
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The force of mortality
x
The expected number of deaths in a very short time interval h in a
very large population of n individuals aged exactly x is therefore
n
x
h.
Example: estimate
50
from a very large population of 50-year
olds by counting how many die within 1 hour. The annual rate of
mortality would then be approximated by the proportion of the
group that had died multiplied by 24 365.
This would not yield an exact value for
50
due to (i) statistical
uctuations, (ii) rounding errors, (iii) leap years are ignored,(iv) the
1-hour period is still very large for an instantaneous measure.
ST3054 38
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The force of mortality
x
There is a close connection to the distribution of mortality:

x
= lim
h0
+
P (x < T x + h)
h
1
P(T > x)
thus the 1-1 relationship between
x
and f (x)

x
=
f (x)
S(x)
=
dS(x)/dx
S(x)
Inversion: since
x
=
d
dx
log S(x), we have
S(x) = exp

x
0

s
ds

= exp [(x)]
ST3054 39
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The force of mortality
x
0.0
0.5
1.0
1.5
2.0
h
a
z
a
r
d

e
s
t
i
m
a
t
e
s
0 20 40 60 80 100
Age (years)
Figure: UK mortality 2003-2005 (Males, Oce of National Statistics):

x
vs age
ST3054 40
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The force of mortality
x
.0001
.001
.01
.1
1
h
a
z
a
r
d

e
s
t
i
m
a
t
e
s

(
l
o
g

s
c
a
l
e
)
0.0
0.2
0.4
0.6
0.8
1.0
s
u
r
v
i
v
a
l

e
s
t
i
m
a
t
e
s
0 20 40 60 80 100
Age (years)
Figure: UK mortality 2003-2005 (Males, ONS):
x
=
d log S(x)
dx
(increasing) and S(x) = exp

x
0

s
ds

(decreasing) vs age
ST3054 41
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The force of mortality
x
.0001
.001
.01
.1
1
h
a
z
a
r
d

e
s
t
i
m
a
t
e
s

(
l
o
g

s
c
a
l
e
)
0.00
0.01
0.02
0.03
0.04
D
e
n
s
i
t
y
0 20 40 60 80 100
Age (years)
Figure: UK mortality 2003-2005 (Males, ONS):
x
(increasing) and f (x)
(unimodal) vs age
ST3054 42
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The force of mortality
x+t
Denition: for x 0 and t > 0, we could dene the force of
mortality
x+t
in two ways:
(1)
x+t
= lim
h0
+
1
h
P (T x + t + h|T > x + t)
(2)
x+t
= lim
h0
+
1
h
P (T
x
t + h|T
x
> t)
We often use
x+t
for a xed age x and 0 t < x.
ST3054 43
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Density of select model (pdf of T
x
)
By def, the distribution function of T
x
is F
x
(t). Thus its pdf:
f
x
(t) =
d
dt
F
x
(t) =
d
dt
P(T
x
t) =
1
S(x)

d
dt
S(x + t)

= lim
h0
+
1
h
(P(T
x
t + h) P(T
x
t))
= lim
h0
+
P(T x + t + h|T > x) P(T x + t|T > x)
h
= lim
h0
+

P(T x + t + h) P(T x)
S(x) h

(P(T x + t) P(T x))


S(x) h

= lim
h0
+
P(T x + t + h) P(T x + t)
S(x) h
ST3054 44
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Density of select model (pdf of T
x
)
Now by multiplying by S(x + t)/S(x + t) we obtain
f
x
(t) =
S(x + t)
S(x + t)
lim
h0
+
P(T x + t + h) P(T x + t)
S(x) h
= S
x
(t) lim
h0
+
1
h
P (T x + t + h|T > x + t)
= S
x
(t)
x+t
In actuarial notation, for a xed age 0 x , this is equivalent
to the following very important relationship
f
x
(t) =
t
p
x

x+t
(0 t < x)
ST3054 45
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Density of select model (pdf of T
x
)
Alternatively, we may observe that
f
x
(t) =
d
dt
S
x
(t) =
d
dt
S(x + t)
S(x)
=
1
S(x)

d
dt
S(x + t)

and since

d
dt
S(x + t) =
d
dt


x+t
f (u)du = f (x + t)
we have
f
x
(t) =
f (x + t)
S(x)
=
S(x + t)
S(x)
f (x + t)
S(x + t)
=
t
p
x

x+t
ST3054 46
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Summary
T
x
random future lifetime after age x (continuous r.v.)
t
q
x
probability that someone aged x dies with t years
q
x
probability that someone aged x dies within 1 year
t
p
x
probability that someone aged x is still alive after t years
p
x
probability that someone aged x is still alive after 1 year
Probabilistic notation Actuarial notation

x
h P(T x + h|T > x)
x
h
h
q
x

x
=
f (x)
S(x)
or f (x) =
x
S(x) f
X
(t) =
x+t

t
p
x
s+t
p
x
=
s
p
x

t
p
x+s
( s, t > 0)
ST3054 47
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
I.2 Life table functions
ST3054 48
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Life table functions
A life table provides the expected number of survivors to each age
in a hypothetical group of lives. We use:
l
x
= expected number of lives at age x
d
x
= expected number of deaths between ages x and x + 1
d
x
= l
x
l
x+1
p
x
=
l
x+1
l
x
q
x
= 1 p
x
= 1
l
x+1
l
x
=
l
x
l
x+1
l
x
=
d
x
l
x
t
p
x
=
l
x+t
l
x
ST3054 49
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Life table functions
In life tables, values are tabulated only for integer age. When
working with continuous age variables, assumptions on the
variation of mortality between integer ages are required. Ex:

deaths occur uniformly between integer ages

the force of mortality is constant between integer ages

the Balducci assumption holds


For integer ages x and 0 t 1, the Balducci assumption states
that
1t
q
x+t
= (1 t)q
x
This assumption is useful particularly in Cox regression analysis.
ST3054 50
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Life table: example including life expectancy
...
ST3054 51
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Life table: example 1
x S(x) l
x
0 1.0000 100,000
1 0.97408 97,408
2 0.97259 97,259
3 0.97160 97,160
4 0.97082 97,082
. . . . . . . . .
109 0.00001 1
110 0.00000 0

Traditional description of survival


function

Start e.g. with radix l

= 100, 000

For subsequent ages:


l
x
=
x
p

Survival probabilities:
t
p
x
=
l
x+t
l
x
ST3054 52
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Life table: example 2
Estimate l
58.25
assuming a uniform distribution of deaths between
exact ages 58 and 59, from the English Life Table 15 (Males):
Age x l
x
58 88,792
59 87,805
There are 88,792 - 87,805 = 987 deaths expected between the
ages of 58 and 59. Assuming deaths within this interval are
uniformly distributed, the number of deaths expected between the
ages of 58 and 58.25 is
987/4 = 246.75
So the expected number of lives at age 58.25 is
88, 792 246.75 = 88, 545.25
ST3054 53
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Life tables: uniform distribution of deaths assumption
Note: Under the assumption of uniform distribution of deaths, the
surviving population at the start of each quarter is decreasing.
This assumption therefore implies that the force of mortality is
increasing over the year of age (58,59).
Result: If deaths are assumed uniformly distributed between the
ages of x and x + 1, it follows that
t
q
x
= t q
x
for 0 t 1.
ST3054 54
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Life tables: uniform distribution of deaths assumption
Proof: Under the assumption we have by linear interpolation
l
x+1
= (1 t)l
x
+ t l
x+1
for 0 t 1. So
t
q
x
= 1
l
x+t
l
x
= 1
(1 t)l
x
+ t l
x+1
l
x
=
t l
x
t l
x+1
l
x
= t(1 p
x
)
= t q
x
ST3054 55
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Initial and central rates of mortality
Since q
x
is the probability that a life alive at age x (the initial
time) dies before age x + 1, it is called an initial rate of mortality.
Denition: The central rate of mortality m
x
dened as
m
x
=
d
x

1
0
l
x+t
dt
=
q
x

1
0
t
p
x
dt
This alternative represents the probability that a life alive between
ages x and x + 1 dies. The denominator

1
0
t
p
x
dt represents the
expected amount of time spent alive between ages x and x + 1 by
a life alive at age x.
ST3054 56
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Initial and central rates of mortality
Note: m
x
measures the rate of mortality over the whole year from
exact age x to exact age x + 1. By contrast,
x
measures the
instantaneous rate of mortality at exact age x.
m
x
is useful for projecting numbers of deaths, given the number of
lives alive in age groups. It constitutes one of the basic
components of a population projection.
In practice, the age groups used in population projection are often
broader than exactly one year, in which case the denition of m
x
must be adjusted accordingly.
ST3054 57
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Initial and central rates of mortality
If
x+t
is a constant, , between ages x and x + 1, then
m
x
=
q
x

1
0
t
p
x
dt
=

1
0
t
p
x
dt

1
0
t
p
x
dt
=
This quantity is close to an occurence-exposure rate statistic
Number of deaths
Total time spent alive and at risk
which can be used to estimate the force of morality
x
.
Note from this that m
x
can never be less than q
x
.
ST3054 58
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
I.3 Expected future lifetime
ST3054 59
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Complete expectation of life
Denition: The expected future lifetime after age x (or
expectation of life at age x) is dened as E[T
x
] and is denoted e
x
:
e
x
=

x
0
t
t
p
x

x+t
dt
=

x
0
t


t
t
p
x

dt
=

t
t
p
x

x
0
+

x
0
t
p
x
dt (integration by parts)
=

x
0
t
p
x
dt
(using
t
p
x

x+t
= f
x
(t) =
t
q
x
/t =
t
p
x
/t and

t
t
p
x

x
0
= 0)
ST3054 60
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Curtate future lifetime
Denition: The curtate future lifetime of a life aged x is
K
x
= [T
x
], where the square brackets [.] denote the integer part.
K
x
is a discrete r.v. taking values on {0, 1, 2, . . . , x}, with
probability function
P(K
x
= k) = P(k T
x
< k + 1)
= P(k < T
x
k + 1) (assuming F
x
(t) is continuous in t)
=
k
p
x
q
x+k
P(K
x
= k) is often denoted
k|
q
x
(k deferred q
x
), as we consider
here deferring the event of death until the year that begins in k
years from now.
ST3054 61
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Curtate expectation of life
Denition: The curtate expectation of life, denoted e
x
, is
e
x
= E[K
x
]
We have
e
x
=
[x]

k=0
k
k
p
x
q
x+k
=
1
p
x
q
x+1
+
2
p
x
q
x+2
+
2
p
x
q
x+2
+
3
p
x
q
x+3
+
3
p
x
q
x+3
+
3
p
x
q
x+3
+. . .
=
[x]

k=1
[x]

j =k
j
p
x
q
x+j
=
[x]

k=1
k
p
x
ST3054 62
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Curtate expectation of life
Additional years Probability
from age X
1
1
p
x
q
x+1
(survives one year and then dies in the next year)
2
2
p
x
q
x+2
... ...
k
k
p
x
q
x+k
... ...
Sum

k
p
x
q
k+1
(k = 1 to x)
ST3054 63
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Relationship between e
x
and e
x
Considering the two formulae
e
x
=

x
0
t
p
x
dt and e
x
=
[x]

k=1
k
p
x
the complete and curtate expectations of life are related by the
approximate equation
e
x
= e
x
+
1
2
Dene J
x
= T
x
K
x
to be the random lifetime after the highest
integer age to which a life x survives. Approximately, E[J
x
] = 1/2
(assuming deaths occur uniformly within each year of age), and
since E[T
x
] = E[K
x
] + E[J
x
], we have e
x
e
x
+ 1/2.
ST3054 64
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Life table: example 3
Figure: Irish Life Table No. 13, 1995-97 (Males)
ST3054 65
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Life table: example 3
Why e
81
=e
80
1?
How would you write e
81
w.r.t e
80
and p
x
?
Figure: Irish Life Table No. 13, 1995-97 (Males), continued
ST3054 66
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Future lifetimes: variance
The variances of the complete and curtate future lifetimes are
Var[T
x
] =

x
0
t
2
t
p
x

x+t
dt e
2
x
Var[K
x
] =
[x]

k=0
k
2
k
p
x
q
x+k
dt e
2
x
These expressions may be useful to:

derive the variance of functions based on future lifetimes

further quantify the likely variation in some index of interest


(e.g. the prots from a life insurance policy, or the cost of
providing a benet from a pension scheme)
ST3054 67
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Uses of the expectation of life
The expectation of life is often used as a measure of the standard
of living and health care in a given country.
The complete expectation of life is used e.g. for premium
calculations, and for longevity studies.
35-40 Angola, Zambia
40-45 Afghanistan, Malawi
45-50 Nigeria, Rwanda, South Africa, Zimbabwe
50-55 Cameroon, Ethiopia, Uganda
55-60 Bangladesh, Ghana, Haiti, Kenya, Russia
60-65 Botswana, Burma, Guyana, Pakistan, Yemen
65-70 Brazil, Guatemala, India
70-75 Barbados, China, Serbia
85-80 Australia, Japan, New Zealand, USA,
most Western European countries
Average life expectancy at birth for males (2009, CIA World Factbook and IFA 2011)
ST3054 68
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
I.4 Some important formulae
ST3054 69
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
A formula for
t
q
x
t
q
x
=

t
0
s
p
x

x+s
ds
This follows from the relationship f
x
(t) =
t
p
x

x+t
. For each time
s [0, t], the integrand is the product of
(i)
s
p
x
, the probability of surviving to age x + s
(ii)
x+s
, which is approximately equal to
ds
q
x+s
, the probability
of dying just after age x + s
These probabilities are mutually exclusive and are thus just added
up (or in the limit integrated).This result allows deriving an
important relationship between
t
p
x
and
x
.
ST3054 70
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
A formula for
t
p
x
t
p
x
= exp

t
0

x+s
ds + c

ST3054 71
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
A formula for
t
p
x
Proof: This follows from

s
s
p
x
=

s
s
q
x
= f
x
(s) =
s
p
x

x+s
Note that

s
log
s
p
x
=

s
s
p
x
s
p
x
=
x+s
hence, for some constant of integration c (which is 0),

t
0

s
log
s
p
x
ds =

t
0

x+s
ds + c
Since
0
p
x
= 1 we have

log
s
p
x

t
0
= log
t
p
x
and
t
p
x
= exp{

t
0

x+c
ds + c} = exp{

t
0

x+c
ds}
(since e
0
= 1, we use c = 0)
ST3054 72
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Summary: integral expressions for
t
q
x
and
t
p
x
t
q
x
=

t
0
s
p
x

x+s
ds
t
p
x
= exp

t
0

x+s
ds + c

(yes, it is so important that we repeat it)


ST3054 73
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
I.5 Simple parametric survival models
ST3054 74
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Parametric models?
.0001
.001
.01
.1
1
h
a
z
a
r
d

e
s
t
i
m
a
t
e
s

(
l
o
g

s
c
a
l
e
)
0.0
0.2
0.4
0.6
0.8
1.0
s
u
r
v
i
v
a
l

e
s
t
i
m
a
t
e
s
0 20 40 60 80 100
Age (years)
Figure: UK mortality 2003-2005 (Males, Oce of National Statistics):

x
(increasing) and S(x) (decreasing) vs age WHAT MODEL?
ST3054 75
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Parametric models?
.0001
.001
.01
.1
1
h
a
z
a
r
d

e
s
t
i
m
a
t
e
s

(
l
o
g

s
c
a
l
e
)
0.00
0.01
0.02
0.03
0.04
D
e
n
s
i
t
y
0 20 40 60 80 100
Age (years)
Figure: UK mortality 2003-2005 (Males, Oce of National Statistics):

x
(increasing) and f (x) (unimodal) vs age WHAT MODEL?
ST3054 76
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The exponential model

Various survival models may be used

In simpler models, the distribution of future lifetime uses a


small number of parameters

One of the simplest models is the exponential model

In this model the hazard rate is constant, i.e.


x
= 0,
and for t 0
t
p
x
= S
x
(t) = e

t
0
ds
= e

t
0
= e
t
and
t
q
x
= 1
t
p
x
= 1 e
t
ST3054 77
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The exponential model
We also have
f (t) = e
t
E[T] =
1

Var[T] =
1

Not appropriate for human survival over broad ranges

Can be used over short ranges

Is used for machine reliability


ST3054 78
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The exponential model
Q1 If
x
= 0.001 (constant) between ages 25 and 30, calculate
the probability that a life aged exactly 25 will survive to age 30
Q2 If
x
= 0.02 at all ages, calculate the age x for which
x
p
0
= 0.5. What does this age represent?
Q3 Given that e
50
= 30 and
50+t
= 0.005 for 0 t 1, what is
the value of e
51
?
ST3054 79
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The exponential model
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 10 20 30 40 50 60 70 80 90 100
Figure: Exponential models in function of age (in years), with
S(t) = e
t
for = 0.10, 0.05, 0.03. Then E[T] = 1/ = 10, 20, 33 resp.
ST3054 80
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The Weibull model

The Weibull model is a simple extension of the exponential


model

The exponential model is a special case of Weibull ( = 1)

In this model the survival function S(t) is


S(t) = e
t

Weibull hazard is monotonically increasing (or decreasing):

t
= t
1
ST3054 81
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The Weibull model

Since
t
=
d
dt
log [S(t)] we have

t
=
d
dt
[t
1
] = t
1

Weibull is a special case of Gamma distribution

Its moments can be calculated relatively easily


ST3054 82
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The Gompertz distribution (1825)

Gompertz law of mortality (t 0, B > 0, c > 1):


S(t) = e
B
log(c)
(1c
t
)

t
= Bc
t

Gompertz law yields an exponentially increasing hazard rate


throughout life
log(
t
) = log(B) + t log(c)

t
= Be
t log(c)

Often a reasonable assumption for middle and older ages

Simple expressions for mean and variance are not available


ST3054 83
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The Gompertz distribution (1825)
.0001
.001
.01
.1
1
h
a
z
a
r
d

e
s
t
i
m
a
t
e
s
0 10 20 30 40 50 60 70 80 90 100
Age (years)
Figure: The hazard function plotted on log-scale here is approximately
linear beyond 30 years of age
ST3054 84
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
The Makeham distribution (1860)

Makehams law of mortality (t 0, B > 0, c > 1, A > B):


S(t) = e
B
log(c)
(1c
t
)At

t
= A + Bc
t

The constant term is sometimes interpreted as an allowance


for accidental deaths

Suggests that part of the hazard rate is age-independent

Otherwise same as Gompertz law

Simple expressions for mean and variance are again not


available
ST3054 85
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Calculating the parameter values
If a life table is know to follow Gompertz law, the parameters B
and c can be determined given the values of
t
at any two ages.
In the case of a life table following Makehams law, the parameters
A, B and c can be determined given the values of
t
at any three
ages.
Question: given that
50
= 0.017609 and
55
= 0.028359,
calculate B and c for a force of mortality
t
known to follow
Gompertz law.
ST3054 86
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Survival probabilities
Survival probabilities
t
p
x
can be found using
t
p
x
= exp

t
0

x+s
ds

Gompertz law: for g = exp

B
log(c)

, we have
t
p
x
= g
c
x
(c
t
1)
Makehams law: for g = exp

B
log(c)

and s = exp(A), we have


t
p
x
= s
t
g
c
x
(c
t
1)
ST3054 87
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Survival probabilities
Proof ...?
ST3054 88
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Gompertz-Makeham family
The force of mortality can be modeled using one of the
Gompertz-Makeham curves. This family of functions is of the form
GM(r , s) =
1
+
2
t + +
r
t
r 1
+ e

r +1
+
r +2
t++
r +s
t
s1
where the
1
, . . . ,
r +s
are constants independent of t.
This is the most widely used form of the GM family. Another
popular form is

x
= GM(r , s) = poly
1
(t) + e
poly
2
(t)
where t is a linear function of x and poly
1
(t) and poly
2
(t) are
polynomials of degrees r and s respectively.
ST3054 89
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Suitable distribution families (summary)
Key constraint for a parametric model:
the domain of f (t) must be R
+
.
Here is a summary of some suitable families:
Exp Weibull Gompertz Makeham Log-logistic
f (t) e
t
t
1
e
t

Bc
t
e
B(1c
t
)
log(c)
(A+Bc
t
)e
B(1c
t
)
log(c)
t
1
(1+t

)
2
F(t) 1 e
t
1 e
t

1 e
B(1c
t
)
log(c)
1 e
B(1c
t
)
log(c)
At
1
1
1+t

S(t) e
t
e
t

e
B(1c
t
)
log(c)
e
B(1c
t
)
log(c)
At
1
1+t

t
t
1
Bc
t
A+Bc
t t
1
1+t

ST3054 90
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Exam-style question (1/2)
1. An investigation is undertaken into the mortality of men
between exact ages 50 and 55 years. A sample of n men is followed
from their 50th birthday until their either die or they reach their
55th birthdays.
The force of mortality (or hazard rate) is assumed to have the
following form

x
= + x
where and are parameters to be estimated and x is measured
in years since the 50th birthday.
(a) Derive an expression for the survival function between ages 50
and 55 years
(b) Sketch this on a graph
ST3054 91
Introduction
Survival models
Lifetime distribution functions
Cox regression
Simple survival model
Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models
Exam-style question (2/2)
[...] The force of mortality (or hazard rate) is assumed to have the
following form

x
= + x
where and are parameters to be estimated and x is measured
in years since the 50th birthday.
(c) Comment on the appropriateness of the assumed form of the
hazard function for modelling mortality over this age range
(d) If there were 100,000 men aged 50 then how many deaths
would you expect between ages 50 and 55 years
(e) Describe the distribution of the number of deaths between
ages 50 and 55 years among the n men
ST3054 92
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Section II
Estimating lifetime distribution
functions
ST3054 93
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
II.1 Statistical inference
ST3054 94
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Introduction

Previous section introduced the continuous r.v. T of future


lifetime

This section presents a methodology for using observations


from an investigation to estimate the lifetime distribution
function F(t) = P(T t) empirically

Statistical properties for the estimates may be derived to


construct variances and condence intervals

The possibility of incomplete data will also be considered

Dening a decrement of interest by death can easily be


extended to the analysis of other decrements such as sickness,
mechanical breakdowns, etc.
ST3054 95
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Overview

Empirical Survival Function

Parametric MLE

Non-parametric MLE

Kaplan-Meier survival function


ST3054 96
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Estimating the lifetime distribution function
Statistical inference: given some mild conditions on the
distribution of T, we can obtain all information by estimating
F(t), S(t), f (t) or (t) for all t 0.
Simple experiment:

Observe a large number of new-born lives

The proportion alive at age t > 0 provides an estimate of S(t)

Use a step function to estimate S(t) with



S(t)
ST3054 97
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Estimating the lifetime distribution function

This is known as the empirical distribution function of T

It is a non-parametric approach to estimation

It is not necessary to assume that T is a member of any


parametric family
ST3054 98
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Estimating the lifetime distribution function
Non-parametric approach:

No prior assumption about the distribution shape or form

Use the data to estimate this shape/form


Parametric approach:

The distribution is assumed to belong to a certain family (e.g.


exponential)

Use the data to estimate the appropriate parameters of this


family (e.g. mean and variance)
ST3054 99
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Estimating the lifetime distribution function
Ex: A life insurance company prefers to base its premium
calculations on a smooth estimate to ensure the premiums change
gradually from one age to the next, without sudden jumps.

A larger sample yields a smoother estimate

Further smoothing also possible


ST3054 100
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Example
Time Died Alive SDF
5 1 9 0.9
10 1 8 0.8
15 1 7 0.7
20 1 4 0.4
20 1 4 0.4
20 1 4 0.4
35 1 3 0.3
40 0 3 0.3
40 0 3 0.3
40 0 3 0.3
ST3054 101
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Example
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
s
u
r
v
i
v
a
l
0 5 10 15 20 25 30 35 40
Time
Figure: Observed proportion

S(t) surviving a given time t
ST3054 102
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Example
0.00
0.25
0.50
0.75
1.00
0 10 20 30 40
analysis time
Empirical Survival
Note step down of 0.1
Note step down of 0.3
(3 deaths)
Note 3 of the 10 (0.3) are still
alive at 40 months.
Figure: Observed proportion

S(t) surviving a given time t
ST3054 103
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Estimating the lifetime distribution function
Limitations:

Dicult to nd a satisfactory group of lives for study

The experiment would take about 100 years to complete

Deaths of all the lives must be recorded (highly impractical)

Censoring is therefore nearly always required

All we know in respect of some lives is that they died after a


certain age
ST3054 104
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Cohorts

Complete data: All units under observation until failure

Incomplete data: units can withdraw/become lost from


observation before death

Analysis of complete data is far simpler, so we do this rst

Cohort: All units come under observation at time t = 0

No entrants after t = 0

All are observed until failure/death:

lab expt. with mice injected with nicotine; t = 0 is beginning


of experiment

People diagnosed with certain type of cancer; t = 0 on day of


diagnosis
ST3054 105
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Follow-up time

Important to distinguish between calendar/chronological time


and time under observation (follow-up time)

Patient A diagnosed on March 1, 1990, dies on March 11,


1991

Patient B diagnosed on July 1, 1991, dies on August 1, 1991


0 365
730
A
B
1/1/90 1/1/92 1/1/91
A
B
ST3054 106
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
II.2 Censoring
ST3054 107
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Censoring

Censoring results in loss of data

Depending on the type of censoring (informative), it may also


yield biased mortality rates

An observational plan is required in a mortality investigation,


to specify start and end dates and categories of lives to be
included

In e.g. medical statistics, non-parametric estimation is very


important

Experiments can be amended to allow for censoring

Otherwise, inference must be based on data with shorter


times (e.g. 3 or 4 years)
ST3054 108
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Censoring
If inference is based on data with shorter times:

We no longer observe the same cohort throughout their joint


lifetimes

We might not be sampling from the same distribution

Model assumptions may thus need to be widened so that the


mortality of lives born in year y is modelled by T
y

In practice, the investigation is divided up into single years of


age (outside scope of ST3054)
ST3054 109
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Censoring

Observing lives between integer ages x and x + 1, and limiting


the period of investigation, are also forms of censoring

Censoring might still occur at unpredictable times


(e.g. lapsing of a policy)

Time of observation corresponding to loss of survivors is


known: either age x + 1 or end of investigation
ST3054 110
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Censoring mechanisms
Data are censored if we do not know the exact values of each
observation but we do have information about the value of each
observation in relation to one or more bounds (e.g. we know that a
person was still alive at age 20 at end of investigation).

Censoring is the key feature of survival data

Survival analysis may be seen as the analysis of censored data

Censoring mechanisms play an important role in statistical


inference
ST3054 111
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Censoring mechanisms
Most common censoring assumptions (not all mutually exclusive):

Right censoring

Left censoring

Interval censoring

Random censoring

Informative and non-informative censoring

Type I censoring

Type II censoring
ST3054 112
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Right censoring

Data are right censored if obs in progress are cut short

Most common form of censoring in actuarial investigations

Ex: end of mortality study before all lives observed have died

Person still alive when investigation ends are right censored

We only know that their lifetime exceeds some value

Ex: life insurance policy holders surrender their policy, active


lives of a pension scheme retire, endowment assurance policies
mature
ST3054 113
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Right censoring
ST3054 114
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Left censoring

Data are left censored if we cannot know when entry into the
state we wish to observe took place

Ex: medical studies where time elapsed between onset and


baseline diagnosis is unknown

Ex: estimating functions of exact age without knowledge of


DOB, estimating functions of exact policy duration without
knowledge of exact date of policy entry, estimating functions
of duration since onset of sickness without knowledge of exact
date of start of sickness

Left censoring is dierent to left truncation


ST3054 115
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Left censoring
ST3054 116
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Truncation

Truncation: when estimating functions of exact age without


info from before the start of investigation period, or before
entry date of policy, etc.

Observed data: time of occurrence (or censored observation


of) the event

Ascertainment time B, earliest initiation time 0

Ex: estimate incubation distribution based on retrospective


samples of AIDS cases with known infection times

Proba: for an individual observed to have experienced the


event after t time units
f (t)
F(B t)
ST3054 117
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Truncation
ST3054 118
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Interval censoring

Data are interval censored if the observational plan only allows


to date an event of interest within a time interval

Ex: actuarial studies where only calendar year of death is


known

Right and left censoring are special cases of interval censoring

Ex: estimating functions of exact age when deaths are known


up to nearest birthday only

Ex: knowing calendar date of death and calendar year of birth


(example of left censoring and also interval censoring since we
only know the lifetime falls within a certain range)
ST3054 119
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Interval censoring
ST3054 120
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Random censoring

Censoring is random if the time C


i
at which observation of the
i
th
lifetime is censored is a random variable

Obs will be censored if C


i
< T
i
where T
i
is the random
lifetime of the i
th
life

Ex: when individuals may leave the observation by a means


other than death, and where the time of leaving is not known
in advance

Ex: life insurance withdrawals, emigration from a population,


members of a company pension scheme may leave voluntarily
when moving to another employer
ST3054 121
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Random censoring

Random censoring is a special case of right censoring

The case in which the censoring mechanism is a second


decrement of interest gives rise to multiple decrement models

Ex: suppose that lives can leave a pension scheme through


death, age retirement or withdrawal. The rates of decrement
for all these causes of decrement can be estimated by a
multiple decrement model.
ST3054 122
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Informative and non-informative censoring

Censoring is non-informative if it gives no information about


the lifetimes {T
i
}

If random censoring: the independence of each pair T


i
, C
i
is
sucient to ensure non-informative censoring

Informative censoring is more dicult to analyse

Essentially this is because the resulting likelihoods cannot


usually be factorised (recall that statistical independence
greatly simplies calculation of likelihoods)
ST3054 123
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Informative and non-informative censoring
Examples of informative censoring:

Withdrawal of life insurance policies (likely to be in better


average health than those who do not withdraw). The
mortality rates of the lives that remain in the at-risk group are
likely to be higher than the mortality rates of the lives that
surrender their policy.

Ill-health retirements from pension schemes (likely to be in


worse average health than continuing members). Mortality
rates of those who remain in pension scheme are likely to be
lower than those of the lives that left through ill-health
retirement.
ST3054 124
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Informative and non-informative censoring
Example of non-informative censoring:

The end of the investigation period, because it aects all lives


equally, regardless of their propensity to die at that point
ST3054 125
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Type I censoring

Type I censoring occurs if the censoring times {C


i
} are known
in advance

This is a degenerate case of random censoring

Also a special case of right censoring

Lives censored at end of investigation period might also be


considered as an example of Type I censoring
ST3054 126
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Type I censoring
Examples of right censoring mechanisms:

When estimating functions of exact age, individuals are not


followed up anymore once they have reached 60

When lives retire from a pension scheme at normal retirement


age (if this is a pre-determined exact age)

When estimating functions of policy duration, observing only


individuals up to their 10
th
policy anniversary

When measuring functions of duration since having a


particular medical operation, and only observing people for a
max of 12 mths from date of operation
ST3054 127
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Type II censoring

Type II censoring is present if observation is continued until a


predetermined number of deaths has occurred

Can simplify the analysis: non-random number of events

Ex: when a medical trial is ended after 100 lives on a


particular course of treatment have died

Observational plan is likely to introduce censoring

Consideration should be given to the eect on the analysis in


specifying this plan

Censoring might also depend on the results of the


observations to date (oncologic trials)
ST3054 128
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Type I and II censoring

Many actuarial investigations are characterised by a


combination of random and Type I censoring

Ex: in life oce mortality studies where policies rather than


lives are observed, and observation ceases either when a policy
lapses (random cens) or at some predetermined date marking
the end of investigation (Type I cens)

Type I and Type II censoring are most frequently met with in


the design of medical survival studies

See Question 8.4


ST3054 129
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
II.3 The Kaplan-Meier (product limit) model
ST3054 130
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
The Kaplan-Meier model: introduction

Derive the empirical distribution function from the data to


allow for censoring

Consider lifetimes as a function of time t without specifying a


starting age x

Applies equally to new-born lives, lives aged x at outset, of


lives sharing a common property at time t (e.g. diagnosis of a
medical condition)
Note: patient age may be important but not the sole determinant,
and is usually treated as an explanatory variable in a multivariate
regression model (cf. next section). Ex: measure mortality
amongst patients suering from a virulent tropical disease.
ST3054 131
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
The Kaplan-Meier model: assumptions

Suppose we observe a population of n lives in the presence of


non-informative right censoring, and suppose we observe m
deaths

Non-informative censoring mortality of the lives alive in the


group is not systematically higher or lower than that of the
censored lives

Estimates of the distribution and survival functions will be


biased if informative censoring actually occurs

If informative censoring is allowed, the lifetimes and censoring


times are no longer independent
ST3054 132
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
The Kaplan-Meier model: assumptions

Dene t
0
= 0 and t
k+1
= and let t
1
< < t
k
, k m, be
the ordered times at which deaths were observed

k m: more than one death may be observed at a single


failure time

Assume d
j
deaths are observed at time t
j
(1 j k) so that
d
1
+ + d
k
= m

Observation of the remaining n m lives is censored (i.e.


these remaining lives are not tracked further)
ST3054 133
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
The Kaplan-Meier model: assumptions

Assume c
j
lives are censored (i.e. removed from investigation)
between times t
j
and t
j +1
(0 j k)

Then c
0
+ c
1
+ + c
k
= n m

Let d
j
be the number of individuals experiencing the event at
duration t
j

Let n
j
be the risk of experiencing the event just prior to
duration t
j
ST3054 134
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
The Kaplan-Meier model: assumptions
The Kaplan-Meier (KM) estimator of the survivor function adopts
the following conventions:
(a) The hazard of experiencing the event is zero at all durations
except those where an event actually happens in our sample
(b) The hazard of experiencing the event at any particular
duration t
j
when an event takes place is equal to
d
j
n
j
(c) For any 0 j k, if c
j
> 0, then

If d
j
= 0, the persons censored are removed from observation
at duration t
j
(at which censoring takes place)

If d
j
> 0, persons who are censored at t
j
are assumed to be
censored immediately after the events have taken place (so
that they are still at risk at that duration)
ST3054 135
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
The Kaplan-Meier model: assumptions
Example [IFA notes]: a group of 15 lab rats are injected with a
new drug. They are observed over the next 30 days. The following
events occur:
Day Event
3 Rat 4 dies from eects of drug
4 Rat 13 dies from eects of drug
6 Rat 7 gnaws through bars of cage and escapes
11 Rats 6 and 9 die from eects of drug
17 Rat 1 killed by other rats
21 Rat 10 dies from eects of drug
24 Rat 8 freed during raid by animal liberation activists
25 Rat 12 accidentally freed by journalist reporting earlier raid
26 Rat 5 dies from eects of drug
30 Investigation closes. Remaining rats hold street party.
ST3054 136
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
3 4
6
11 (2 rats)
17 24
26
25 30 (5 rats)
21
censored
died
Day
t1 t2
t3 t5 t4
Day Event
3 Rat 4 dies from eects of drug
4 Rat 13 dies from eects of drug
6 Rat 7 gnaws through bars of cage and escapes
11 Rats 6 and 9 die from eects of drug
17 Rat 1 killed by other rats
21 Rat 10 dies from eects of drug
24 Rat 8 freed during raid by animal liberation activists
25 Rat 12 accidentally freed by journalist reporting earlier raid
26 Rat 5 dies from eects of drug
30 Investigation closes. Remaining rats hold street party.
ST3054 137
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
The Kaplan-Meier model: assumptions

n = 15 lives under investigation, m = 6 drug-related deaths

k = 5 death time points; times at which deaths were


observed: t
1
= 3, t
2
= 4, t
3
= 11, t
4
= 21, t
5
= 26

Number of deaths observed at each failure time:


d
1
= 1, d
2
= 1, d
3
= 2, d
4
= 1, d
5
= 1

n m = 9 lives did not die due to drugs

Number of lives censored:


c
0
= 0, c
1
= 0, c
2
= 1, c
3
= 1, c
4
= 2, c
5
= 5
(

k
j =0
c
j
= n m)

Number of lives and at risk at time t


i
:
n
1
= 15, n
2
= 14, n
3
= 12, n
4
= 9, n
5
= 6
ST3054 138
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
The Kaplan-Meier model: assumptions

We can see the approach as a partition of duration into very


small intervals

The risk of the event happening is 0 at those intervals where


no event occurs

The data oers no evidence to suppose anything else

In those intervals in which events do occur, the hazard is


assumed constant (i.e. piecewise exponential) within each
interval

The hazard is allowed to vary between eventful intervals


ST3054 139
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
The Kaplan-Meier model: assumptions

Recall that if
x+t
= , then S
x
(t) =
t
p
x
= e
t

The survival function is exponential over each short interval


over which the force of mortality (or hazard) is constant

The hazard within the interval containing event time t


j
is
estimated for 1 j k as

j
=
d
j
n
j

This is a non-parametric MLE that maximises


k

j =1

d
j
j
(1
j
)
n
j
d
j
(product of independent binomial likelihoods)

In eventless intervals, d
j
= 0 and the hazard becomes 0
ST3054 140
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Extending the force of mortality to discrete distributions
Denition: Suppose F(t) has probability masses ar the points
t
1
, . . . , t
k
. Then the discrete hazard function is dened as

j
= P[T = t
j
|T t
j
] (1 j k)


j
may be seen as the proba that a given individual dies on
day t
j
, given that they were still alive at the start of that day
ST3054 141
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Extending the force of mortality to discrete distributions
Ex: butteries of a certain species have short lives. After hatching,
each buttery experiences a lifetime dened by the following
probability distribution:
Lifetime (days) Probability
1 0.10
2 0.30
3 0.25
4 0.20
5 0.15
Calculate
j
for j = 1, 2, ..., 5 (to 3 decimal places) and sketch a
graph of the discrete hazard function.
ST3054 142
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Calculating the KM estimate of the survival function
If we assume that T has a discrete distribution then
1 F(t) =

t
j
t
(1
j
)
Since 1 F(t) = S(t), we can estimate the survival function using
the formula

S(t) =

t
j
t
(1

j
)
This is the Kaplan-Meier estimator.
ST3054 143
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Calculating the KM estimate of the survival function
To compute

S(t), we multiply the survival probabilities within each
of the intervals up to and including duration t. The survival
probability at time t
j
is estimated by
1

j
=
n
j
d
j
n
j
=
number of survivors
number at risk
So the probability of survival at time t is estimated by

S(t) =

t
j
t
n
j
d
j
n
j
The KM estimate is also called the product limit estimate as a
result of this expression.
ST3054 144
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Calculating the KM estimate of the survival function
To summarize the approach:

Finer and ner partitions of the time axis are chosen


(1 j k)

(1 F(t)) is estimated as the product of the probabilities of


surviving each sub-interval

Then the KM estimate is obtained using

j
= P[T = t
j
|T t
j
], as the mesh of the partition tends to 0

This KM estimate is constant after the last duration at which


an event occurred: it is not dened at durations longer than
the duration of the last censored observation

Only those at risk at {t


j
} contribute to the estimate
ST3054 145
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Calculating the KM estimate of the survival function

It is unnecessary to start observation on all lives at the same


time or age

The estimate is valid for data truncated from the left,


provided truncation is non-informative in the sense that entry
to the study at a particular age or time is independent of the
remaining lifetime
ST3054 146
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Calculating the KM estimate of the survival function
Ex: using the data from the observation of lab rats, calculate the
Kaplan-Meier estimate of F(t).
j t
j
d
j
n
j

j
= d
j
/n
j
(1

j
) 1

j
k=1
(1

k
)
1 3 1 15 0.0667 0.9333 0.0667
2 4 1 14 0.0714 0.9286 0.1333
3 11 2 12 0.1667 0.8333 0.2778
4 20 1 9 0.1111 0.8889 0.3580
5 26 1 6 0.1667 0.8333 0.4650

F(t) =

0 for 0 t < 3
0.0667 for 3 t < 4
0.1333 for 4 t < 11
0.2778 for 11 t < 21
0.3580 for 21 t < 26
0.4650 for t 26
ST3054 147
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
A graphical approach

We can use a graphical approach to carry out KM estimation

Ex: derive an estimate



S(t) of the survival function S(t) to
obtain

F(t) = 1

S(t)

The graph of

S(t) is a step function starting at 1 and
stepping down at each new death

The heigh of each step must be calculated to specify



S(t)
ST3054 148
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
A graphical approach: example (lab rat data)
!
!
!
!
!
Estimate of the survival function
Time
S
u
r
v
i
v
a
l

p
r
o
b
a
b
i
l
i
t
y
!
0 3 11 21 26 30 4
0
.
0
0
0
.
2
5
0
.
5
0
0
.
7
5
1
.
0
0

S(t) t
1 0 t < 3
14/15 3 t < 4
14/1513/14 4 t < 11
13/1510/12 11 t < 21
... ...
ST3054 149
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Comparing lifetime distributions

Ex: compare lifetime distributions of two populations


following dierent drug treatments

Use statistical properties of KM estimates for comparison

Greenwoods formula for MLE



F :
Var

F(t)

1

F(t)

t
j
t
d
j
n
j
(n
j
d
j
)

Accurate if large # of uncensored data (20+) and for


0 S(t) 1; otherwise estimates may be beyond 0 or 1

This variance estimate can be used to construct CIs


ST3054 150
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Points to note on the KM estimator

KM estimator is based on non-informative censoring

Value of estimator not well dened if last data point is


censored

With no censoring, KM is the same as empirical SDF

KM is implemented in most statistical packages, including R

Can also be derived from the theory of counting processes


ST3054 151
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Pointwise condence intervals for KM estimator

S(x)
1/
,

S(x)

, where = exp
_
_
Z
1/2

Var[

S(x)]

S(x) log(

S(x))
_
_

This CI is not
symmetric about S(t)

Bands can be
constructed by
adjusting conf level
0 50 100 150
0
.
0
0
.
2
0
.
4
0
.
6
0
.
8
1
.
0
t
S
(
t
)
> leuk.surv = survfit(Surv(time)0, data=leukemia)
> plot(leuk.surv,xlab="t",ylab="S(t)",bty="n")
ST3054 152
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
The Nelson-Aalen model

Other non-parametric constructs exist to estimate F(t)

The Nelson-Aaden estimator also assumes non-informative


censoring

Uses the integrated hazard function to estimate



S(t):

t
=

t
0

s
ds +

t
j
t

Nelson-Aalen estimate of integrated hazard:

t
=

t
j
t
d
j
n
j
ST3054 153
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
The Nelson-Aalen model

aka Fleming-Harrington method in R

Nelson-Aalen estimate of the survival function:

S(t) = e

Nelson-Aalen estimate of the distribution function:

F(t) = 1 e

t
Its variance is given by
Var

t
j
t
d
j
(n
j
d
j
)
n
3
j
ST3054 154
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Relationship between the KM and NA estimates

The KM estimate can be rewritten as

F
KM
(t) = 1

t
j
t

1
d
j
n
j

Using e
x
1 + x for small x, we have

F
KM
(t) 1 e

t
=

F
NA
(t)
ST3054 155
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Survival estimation in R
> library(survival)
> leukemia
> leuk.km = survfit(Surv(time, status) x, data=leukemia)
> leuk.km.ncs <- survfit(Surv(time) x, data=leukemia)
> plot(leuk.km[1], conf.int=F, xlab="t", ylab="S(t)", bty="n")
> lines(leuk.km.ncs[1], lty=4)
> legend("topright",c(Censoring", No censoring"), lty=c(1,4))
ST3054 156
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Survival estimation in R
0 50 100 150
0
.
0
0
.
2
0
.
4
0
.
6
0
.
8
1
.
0
t
S
(
t
)
Censoring
No censoring
ST3054 157
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
KM vs NA
> leuk.km = survfit(Surv(time,status), data=leukemia)
> leuk.na = survfit(Surv(time,status), data=leukemia,type="flem")
> # The Fleming-Harrington estimate is actually
> # exp(- NelsonAalen)
> plot(leuk.km, conf.int=F, xlab="t", ylab="S(t)", bty="n")
> lines(leuk.na, lty=4)
> legend("topright", c(Kaplan-Meier",Nelson-Aalen"), lty=c(1,4))
ST3054 158
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
KM vs NA
0 50 100 150
0
.
0
0
.
2
0
.
4
0
.
6
0
.
8
1
.
0
t
S
(
t
)
Kaplan!Meier
Nelson!Aalen
ST3054 159
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Testing dierences in survival curves
Here the 2 subpopulations (low risk vs high risk of H&N cancer)
appear to be dierent. Is it a statistically signicant dierence or
due to too small a sample size?
ST3054 160
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Testing dierences in survival curves

Various tests allow to test for dierences in survival curves

The log-rank test and the generalised Wilcoxon test are


popular nonparametric tests

Let us denote:
- K the number of categories
- d
k,(i )
the number of deaths in group k at ordered time t
(i )
- d
(i )
=

K
k=1
d
k,(i )
the total number of deaths at time t
(i )
- n
k,(i )
the number of members of group k at risk at t
(i )
- n
(i )
the total number of members at risk right before t
(i )
ST3054 161
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Tests with two categories

Hypotheses:
H
0
: S
1
(t) = S
2
(t)
H
1
: S
1
(t) = S
2
(t)

Under H
0
, the expected number of deaths in group k at time
t
(i )
is
e
k,(i )
=
n
k,(i )
d
(i )
n
(i )

Assumptions:

censoring is independent of group


m
i =1
d
(i )
is large


m
i =1
e
k,(i )
is large
ST3054 162
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Tests with two categories

The variance of d
k,(i )
is given for k = 1 and k = 2 by
v
(i )
=
n
1,(i )
n
2,(i )
d
(i )
(n
(i )
d
(i )
)
n
2
(i )
(n
(i )
1)

Given a set of weights {w


i
}, the test-statistic is
q =

m
i =1
w
i
(d
1,(i )
e
1,(i )
)

m
i =1
w
2
i
v
(i )

If H
0
is true then q X
2
1
asymptotically, and the p-value
follows this cdf:
p = P(Q > q|H
0
true)
ST3054 163
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Tests with two categories

Several tests are dened by the choice of weights

For the log-rank test, we use w


i
= 1

For the generalised Wilcoxon test, we use w


i
= n
(i )

The Tarone-Ware test uses w


i
=

n
(i )

As a result, the Wilcoxon test favors earlier events

The Tarone-Ware tests emphasizes intermediate events

These tests can be generalised to the case multiple categories


(using matrix algebra)
ST3054 164
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
II.4 Parametric estimation of the survival function
ST3054 165
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Parametric estimation of survival

Steps to parametric estimation of survival:


(1) Assume a functional form for S(t)
(2) Express S(t) and h(t) in terms of its parameters
(3) Estimate these parameters, e.g. by MLE

A closed-form solution for such approaches is not always


available and estimation is very often iterative

Simple functional forms include the exponential and Weibull


distributions and the Gompertz law

Life tables are discrete survival models, derived from


parametric estimates obtained at narrow age groups
ST3054 166
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Maximum likelihood estimation
Consider the exponential hazard with parameter and n
independent lives between age x and x + 1:
(a) A life may die between ages x and x + 1
(b) A life may withdraw from the investigation between ages x
and x + 1
(c) A life may survive until age x + 1
Cases (b) and (c) are treated as censored at either the time of
withdrawal or at exact age x + 1, resp.
ST3054 167
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Maximum likelihood estimation (exponential hazard model)
Assume we observe k individuals from case (a), and n k
individuals from cases (b) and (c). Under the exponential model,
the likelihood is


deaths
f (t
i
)


censored lives
S(t
i
)

k
e

k
i =1
t
i

n
i =k+1
t
i

The likelihood term to be maximised w.r.t. is therefore


L() =
k
e

n
i =1
t
i
and the MLE of is dened as
= arg max

L()
ST3054 168
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Maximum likelihood estimation (general case)
Let us now use indicator
i
with value 1 if life i died and 0 if life i
was censored. Then we have the following general expression for
the likelihood:
L =
n

i =1
f (t
i
)

i
S(t
i
)
1
i
and since f (t) = S(t)h(t),
L =
n

i =1
h(t
i
)

i
S(t
i
)

i
S(t
i
)
1
i
=
n

i =1
h(t
i
)

i
S(t
i
)
Note also that
arg max L = arg max log(L)
ST3054 169
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Maximum likelihood estimation (exponential hazard model)
We obtain an expression for the MLE by nding the optimum of
log(L). Now substituting for the exponential case:

log(L()) =

n
i =1

i

i =1
t
i
and =

n
i =1

i

n
i =1
t
i
This indeed coincides with a maximum for L() since

2
log(L())

2
=

n
i =1

i

2
< 0
ST3054 170
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Using estimates over age ranges

Repeat parametric estimation over years of age to obtain a


series of estimates for the dierent hazards in each year of age

Treat each year of survival from age x independently, so that


2
p
x
=

S
x
(1)

S
x+1
(1) = e

x
e

x+1

Probability of surviving m years is therefore


m
p
x
=

S
x
(m) = e

m1
j =0

x+j

Use this chaining to evaluate probabilities over any age range


ST3054 171
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Exam-style question (1/3)
1. A medical study was carried out between 1 January 2001 and
1 January 2006, to assess the survival rates of cancer patients.
The patients all underwent surgery during 2001 and then attended
3-monthly check-ups throughout the study.
For those patients who died during the study exact dates of death
were:
Patient Date of surgery Date of death
A 1 April 2001 1 August 2005
B 1 April 2001 1 October 2001
C 1 May 2001 1 March 2002
D 1 September 2001 1 August 2003
E 1 October 2001 1 August 2002
ST3054 172
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Exam-style question (2/3)
[...] For those patients who survived to the end of the study:
Patient Date of surgery
F 1 February 2001
G 1 March 2001
H 1 April 2001
I 1 June 2001
J 1 September 2001
K 1 September 2001
L 1 November 2001
ST3054 173
Introduction
Survival models
Lifetime distribution functions
Cox regression
Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function
Exam-style question (3/3)
[...] For those patients with whom the hospital lost contact before
the end of the investigation:
Patient Date of surgery Date of last check-up
M 1 February 2001 1 August 2003
N 1 June 2001 1 March 2002
O 1 September 2001 1 September 2005
(i) Explain whether and where each of the following types of
censoring is present in this investigation:
(a) type I ; (b) interval ; (c) informative
(ii) Calculate the Kaplan-Meier estimate of the survival function
for these patients. State any assumptions that you make.
(iii) Hence estimate the probability of death within 4 yrs of surgery.
ST3054 174
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Section III
The Cox regression model
ST3054 175
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
III.1 Modelling approach
ST3054 176
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Eect of covariates

One may need to study the eect of a number of covariates


on a population

Typical covariates may be age, sex, weight, treatment type,


tumour stage, ...

The question is that of the eect of covariates on lifetime

How do we model this eect on lifetimes?

Lets rst follow a parametric approach to study the eect of


one variable
ST3054 177
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Log-linear hazard models

Model T
i
for individual i ? One constraint: T
i
0

Model log-hazard to avoid constraints

Log-linear hazard model for the hazard rate function:


log(T
i
) = x
i
+
i
where models the eect of covariate x
i
and
i
is some noise

A general expression for the lifetime is


T
i
= T
0,i
e
x
i
+
i

Usually, estimate parameters via maximum likelihood


ST3054 178
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Log-linear hazard models

Ex: model T
i
T
0,i
e
x
i

with a dummy variable x

Factor with 2 levels (groups 1 and 2): x


1
= 0 and x
2
= 1

Then T
1
= T
0,1
and T
2
= T
0,2
e

Say = log(2), then T


2
= 2T
0,2

If T
0,1
= T
0,2
(same population a priori ), then T
2
= 2T
1

Level of x (0 or 1) distinguishes between these two groups

We also have S
2
(t) = S
1
(t/2) (proportional survival)
ST3054 179
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Log-linear hazard models

Dierent kinds of parametric models are obtained by assuming


dierent error distributions

Assuming Gaussian noise yields log-normal lifetimes (Tobit)

Assuming
i
f

(u) = e
(ue
u
)
yields the exponential
distribution with constant hazard rate
log(
i
) = x
i
t

Extend log-hazard model using a proportional hazard rate:

i
(t) = (t)e
x
i

ST3054 180
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Log-linear hazard models

Dierent kinds of proportional hazards models are obtained by


assuming dierent kinds of baseline hazard functions

Ex: (t) =
0
yields the exponential regression model with
(t, x
i
) =
0
e
x
i

Ex: (t) = t
1
yields the Weibull model
- if = 1 then exponential model
- if > 0 then Weibull model
- if < 1 then risk decreases over time
ST3054 181
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
2-sample log-linear hazard model example

Take 2 lives with covariate values x


1
= 0, x
2
= 1

Let (t) = e
+x
and
1
(t) =
1
,
2
(t) =
2

No constraints are required on , to ensure (t) > 0

Model log-linear hazards:


1
(t) = e

,
2
(t) = e

Sign() indicates whether


1
>
2
or
2
>
1

We obtain the following Hazard ratio or relative risk

2
(t)

1
(t)
= e

Generalisation: let x be a vector of covariates


ST3054 182
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Limitations of parametric models

Parametric models assume a xed shape for the lifetime


distribution

These various models suit specic situations or scenarios, not


so suitable when one lacks guidance

Some applications require learning about the underlying


hazard function

Censoring also complicates the estimation procedure greatly

A multivariate regression model can be used instead of a


nonparametric approach

The Cox proportional hazard model allows for this


ST3054 183
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
III.2 The Cox model
ST3054 184
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Proportional hazards
Denition: Given a set of p-dimensional vectors of covariates
{x
i
}
n
i =1
, the Cox model (1972) denes the hazards function as
(t; x
i
) =
0
(t) exp(x
T
i
)
where is a p-dimensional vector of regression parameters, and

o
(t) is the baseline hazard.

The baseline hazard represents a hazard pattern (shape)


common to the whole population

The individual eect of the p covariates is determined by the


product x
T
i
for each individual
ST3054 185
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Proportional hazards

With the Cox model, each life is attributed a hazard


proportional to the baseline hazard

Dierences between individuals are determined by the


covariates x
i
(measured)

In this formulation, only


0
(t) depends (explicitly) on t

Extensions of this model allow for time-varying covariates

Other models may be thought of, although exp(x


T
i
):

ensures a positive hazard

yields a linear log-hazard


ST3054 186
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Proportional hazards
Under the Cox model, the hazards of two dierent lives are
proportional at all times:
(t; x
1
)
(t; x
2
)
=
exp(x
T
1
)
exp(x
T
2
)
does not depend on t.
Time
H
a
z
a
r
d
ST3054 187
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Proportional hazards
The constant hazards ratio between these two lives is:
(t; x
1
)
(t; x
2
)
=
exp(x
T
1
)
exp(x
T
2
)
=
exp

p
j =1

j
x
1,j

exp

p
j =1

j
x
2,j

= exp
_
_
p

j =1

j
(x
1,j
x
2,j
)
_
_
Time
H
a
z
a
r
d
ST3054 188
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Eect of covariates on risk

In exp(x
T
), determines the contribution of the vector of
covariates x to the hazard rate

If the j th covariate x
i ,j
takes positive values only, then
j
> 0
implies a positive correlation between x
i ,j
and the hazard rate
(hazard increases with x
i ,j
)

The magnitude of
j
determines the strength of this
correlation: a large
j
implies a signicant increase in hazard
with a unit increase in x
j
(by one standard deviation)

Likewise,
j
< 0 implies that an increase in the covariate
results in a decrease in risk

The signicance of each covariate can be tested statistically


ST3054 189
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Eect of covariates on risk: example

Ex: the covariates for a given life are (62, 168, 85)
(age at start of study, height in cm, weight in kg)

Given

= (0.0156, 0.0032, 0.0201), we can calculate (t, x)
for this life:
(t, x) =
0
(t) e
620.01561680.0032+850.0201
=
0
(t) e
2.1381
= 8.4833
0
(t)
(strong increase from baseline risk due mainly to the weight)
ST3054 190
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
The Cox model in practice

The Cox model separates baseline hazard and individual eect

This allows to focus on estimating the eect of covariates

One can estimate from the data while ignoring


0
(t)
(nuisance parameter)

Semi-parametric approach: distribution of failure is unspecied

Estimating (t, x
i
) for an individual requires estimating
0
(t)

Can provide answers such as treatment halves hazard rates,


smoking trebles hazard rates

But not answers such as red wine increases survival by 10


years, coee shortens life by 6 months
ST3054 191
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
The Cox model in practice

The hazard functions of two individuals can never cross

Preliminary check on NA estimates required!

Proportional hazard models are not appropriate if NA


estimates clearly cross
Time
H
a
z
a
r
d
ST3054 192
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
III.3 Cox regression
ST3054 193
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Likelihood in the Proportional Hazard Model

Generic form of likelihood for right-censored data:


lik =

i dead

i
(t, x)

j all
S
j
(t, x)

Substituting the PHM:


L(
0
, ) =

i dead

0
(t
i
)e
x
i

j all
e
e
x
j

t
j
0

0
(s)ds

Simultaneous maximization is not possible

Fix rst and maximize w.r.t.


0
(t) (prole likelihood)

Likelihood is max when


0
(t) = 0 except at t = t
i

Dene
0i
=
0
(t
i
), then substitute back into likelihood
ST3054 194
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
ML wrt the baseline hazard

The prole likelihood can be rewritten as


L(
01
, ...,
0D
) =

i dead

0i

j R
i
e
x
j

The prole MLE of


0i
becomes

0i
=
1

j R
i
e
x
j

This is Breslows estimator of the baseline hazard

Substituting the estimator in the overall likelihood, we get a


prole likelihood estimator for , known as the partial
likelihood
ST3054 195
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
The partial likelihood
We focus now on estimating the term e
x
T
i
(and thus
= (
1
, ...,
p
)) describing individual mortalities in the Cox model.

This is usually done via partial maximum likelihood

Assume for now that one event only occurs at each


observation time point t
j
, 1 j k

Partial likelihood:
L() =
k

j =1
e
x
T
j

i R
j
e
x
T
i
where R
j
denotes the set of lives alive at risk at time t
j

Cox showed (1975) that the usual likelihood methods apply


ST3054 196
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
The partial likelihood
Recall that (t, x
i
) denotes the hazard rate (or force of mortality)
for the i th life at risk. Partial Likelihood is thus
L() =
k

j =1
(t, x
j
)

i R
j
(t, x
i
)

This expression indicates that the likelihood of mortality


changes every time an event occurs

Under the assumption of independent events, the likelihood is


the product of these individual contributions

We obtain a partial likelihood since the time-dependent


terms cancel out and this information is lost
ST3054 197
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
The partial likelihood

Partial Likelihood must be maximised using an iterative


optimisation technique (eg Newton-Raphson)

PHM can be extended to time-dependent covariates

Individual variability in parameters via frailty models

The model must be adapted to account for censoring

Censoring may be allowed by including censored lives within


R
j
for any t
j

Corresponds to assuming censoring occurs after events


ST3054 198
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Two-sample example

No treatment (x=0): 7, 9+, 18. Treatment (x=1): 12, 19+.


(times of events, + denotes censoring)

PHM: (t, x) =
0
e
x
, x {0; 1}

Partial likelihood:
L
p
=

e
0
3e
0
+ 2e

e
0
+ 2e

e
0
e
0
+ e

1
3e
0
+ 2e

1 + 2e

1
1 + e

Likelihood must be maximised by numerical methods


ST3054 199
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Partial likelihood for ties

The model must also allow for multiple events at one time
point t
j
(i.e. d
j
> 1)

The general partial likelihood for ties is:


L
p
() =

(i )
_
_
_
_
e

j D
(i )
x
j
(y
(i )
)

combinations
D

(i )
R
(i )

j D

(i )
x
j
(y
(i )
)

_
_
_
_

Computationally very expensive if many ties

In practice, use an approximation like Breslows or Efrons


ST3054 200
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Partial likelihood for ties: example
Tied survival data (times of events, + denotes censoring):
No treatment (x=0): 7, 9+, 18. Treatment (x=1): 18, 19+.
P(x
3
and x
4
fail at 18 | 2 failures at 18))
=

0
(18)e
x
3

0
(18)e
x
4

0
(18)e
x
3

0
(18)e
x
4
+
0
(18)e
x
4

0
(18)e
x
5
+
0
(18)e
x
3

0
(18)e
x
5
=
e
.0+.1
e
.0+.1
+ e
.1+.1
+ e
.0+.1
Thus,
L
p
=

e
.0
3e
.0
+ 2e
.1

e
.0+.1
e
.0+.1
+ e
.1+.1
+ e
.0+.1

1
3 + 2e

2e

+ e
2

ST3054 201
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Partial likelihood for ties

Approximate partial likelihood using Breslows approximation

In this case we maximise


L() =
k

j =1
e
s
T
j

i R
j
e
x
T
i

d
j
where s
j
is the sum of the covariate vectors x of the d
j
lives
that experienced an event at time t
j
.

Breslows approx treats ties as nearly equal, but distinct


observations

Other approximations are available, e.g. Efrons


ST3054 202
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Properties of the partial likelihood

The maximum of the partial likelihood is an asymptotically


unbiased estimator of

The maximum partial likelihood estimator is asymptotically


multivariate normal

Its asymptotic variance can be estimated by the inverse of the


sample Fisher information matrix M dened for 1 i , j p by
M
ij
=

2
log L()

This variance is typically computed to construct condence


bounds on

ST3054 203
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Cox regression

In practice, covariates that can take values over a range of


levels (categories) are split into dummy variables

n 1 dummy variables are thus used to model a covariate


that has n categories

For example, if three treatments A, B and C are used in a


medical study, the covariate X =treatment type can take
three levels (A, B or C) and we use two dummy variables:
X
1
=

1 for treatment B
0 otherwise
X
2
=

1 for treatment C
0 otherwise
ST3054 204
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Cox regression

Use 2 dummy covariates to model X =treatment type for


three treatments A, B and C:
X
1
=

1 for treatment B
0 otherwise
X
2
=

1 for treatment C
0 otherwise

The hazard rate (t, x) =


0
(t) e
X
T
=
0
(t) e

1
X
1
+
2
X
2
then
covers all possible cases

The hazard rate (t, x) =


0
(t) corresponds to the baseline
case of a patient receiving treatment A
ST3054 205
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Cox regression: example

A scientist studies the eect of three treatments (A, B and C)


on patients suering a serious medical condition. He uses Cox
regression to model the hazard rates on any given day
following treatment, using the following covariates:
X
1
=

1 for males
0 for females
X
2
=

1 for treatment B
0 otherwise
X
3
=

1 for treatment C
0 otherwise

The regression parameters are estimated to be

= (0.031, 0.025, 0.011)


ST3054 206
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Cox regression: example

The baseline prole


0
(t) corresponds to a female patient
receiving treatment A

The hazard for a female patient receiving treatment B is

female,B
(t) =
0
(t) e
0.025
. The ratio of these two hazards is

female,A
(t)

female,B
(t)
= e
0.025
= 1.0253
so the risk of an event is estimated to decrease by 2.53%
when using treatment B instead of A for female patients.
ST3054 207
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Cox regression: example

The hazard for a male patient receiving treatment C is

male,C
(t) =
0
(t) e
0.031+0.011
=
0
(t) e
0.042
. The ratio of
these two hazards is

female,A
(t)

male,C
(t)
= e
0.042
= 0.9589
so the risk of an event is estimated to be 4.11% higher for a
male patient receiving treatment C than for a female patient
receiving treatment A.
ST3054 208
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Numeric example of a PHM in R
library(survival)
library(MASS) # contains dataset leuk
leuk: Data from 33 leukemia patients with white blood count
(wbc) and presence/absence of leukemia marker (ag)
wbc ag time
1 2300 present 65
2 750 present 156
3 4300 present 100
4 2600 present 134
5 6000 present 16
leuk.cox <- coxph(Surv(time)ag+log(wbc), data=leuk);
summary(leuk.cox)
ST3054 209
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Numeric example of a PHM in R
leuk.cox <- coxph(Surv(time)ag+log(wbc), data=leuk);
summary(leuk.cox)
coef exp(coef) se(coef) z p
agpresent -1.069 0.343 0.429 -2.49 0.0130*
log(wbc) 0.368 1.444 0.136 2.70 0.0069**
exp(coef) exp(-coef) lower .95 upper .95
agpresent 0.343 2.913 0.148 0.796
log(wbc) 1.444 0.692 1.106 1.886
Rsquare= 0.377 (max possible=0.994)
Likelihood ratio test= 15.6 on 2 df, p=0.000401
Wald test = 15.1 on 2 df, p=0.000537
Score (logrank) test = 16.5 on 2 df, p=0.000263
In this example, both variables are signicant
ST3054 210
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
III.4 Model selection
ST3054 211
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Eect of covariates

The eect of a covariate may be studied by incorporating this


covariate to an existing model with p covariates

One would then t two Cox models with dierent sets of


covariates (having p and p + 1 covariates)

Two ts can be compared e.g. in terms of a likelihood ratio

Convenient when tting the models using maximum likelihood

Then just compare the two maximum likelihoods L


p
and L
p+1

Generalizes to the case of adding q covariates:


compare L
p
and L
p+q
ST3054 212
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Likelihood ratio test

The likelihood ratio statistic is dened as


2(L
p
L
p+q
)

Dene H
0
: the extra q covariates do not have an eect in the
presence of the other p covariates, i.e.
H
0
:
p+1
=
p+2
= =
p+q
= 0

This test statistic has an asymptotic


2
q
distribution

Other tests are available for model testing (AIC, Mallows)


ST3054 213
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Model selection

The likelihood ratio test may be used to select a model based


on maximum likelihood

1 of 2 strategies is generally applied: either (a) bottom-up or


(b) top-down
(a) Start with the null model (no covariates) and add candidate
covariates one at a time
(b) Start with the full model (all covariates) and remove
non-signicant covariates

One must also test for interactions between covariates

The LRT test is a very common model selection tool in


statistical applications
ST3054 214
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Model building for PH in R
anova(leuk.cox, test="Chisq")
Analysis of Deviance table
Cox model: response is Surv(time)
Terms added sequentially (first to last)
loglik Chisq Df Pr(>|Chi|)
NULL -85.054
ag -80.924 8.2612 1 0.004050**
log(wbc) -77.234 7.3799 1 0.006596**
ST3054 215
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Proportional hazards model checking in R
leuk.cox2=coxph(Surv(time)strata(ag)+log(wbc), data=leuk)
plot(survfit(leuk.cox2), fun="cumhaz", log=T, lty=c(1,4))
0 50 100 150
0
.
0
5
0
.
1
0
0
.
2
0
0
.
5
0
1
.
0
0
2
.
0
0
5
.
0
0
ST3054 216
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Residual diagnostics
Martingale residuals or deviance residuals:
r
M
i
=
i
exp

T
x
i


H
0
(t
i
)
r
D
i
= sign(r
M
i
)

2(r
M
i

i
log (
i
r
M
i
))
scatter.smooth(leuk$wbc,resid(leuk.cox))
plot(1:length(leuk$time), resid(leuk.cox,type="deviance"))
ST3054 217
Introduction
Survival models
Lifetime distribution functions
Cox regression
Modelling approach
The Cox model
Cox regression
Model selection
Residual diagnostics
scatter.smooth(leuk$wbc,resid(leuk.cox))
plot(1:length(leuk$time), resid(leuk.cox,type="deviance"))
0 e+00 2 e+04 4 e+04 6 e+04 8 e+04 1 e+05
-
2
-
1
0
1
log(wbc)
m
a
r
t
i
n
g
a
l
e

r
e
s
i
d
u
a
l
s
0 5 10 15 20 25 30
-
3
-
2
-
1
0
1
2
3
index
d
e
v
i
a
n
c
e

r
e
s
i
d
u
a
l
s
ST3054 218

Das könnte Ihnen auch gefallen