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

st3054 Slides PDF

This document provides an outline for the ST3054 - Survival Analysis module. It introduces survival models and their applications in demography, public health, insurance, and clinical studies. It describes the objectives and content of the module which includes parametric survival models, the Kaplan-Meier estimator, and the Cox proportional hazards model. The document also lists the learning outcomes and provides a timetable for lectures, tutorials and assessment.

Uploaded by

Damien Ashwood
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
210 views

st3054 Slides PDF

This document provides an outline for the ST3054 - Survival Analysis module. It introduces survival models and their applications in demography, public health, insurance, and clinical studies. It describes the objectives and content of the module which includes parametric survival models, the Kaplan-Meier estimator, and the Cox proportional hazards model. The document also lists the learning outcomes and provides a timetable for lectures, tutorials and assessment.

Uploaded by

Damien Ashwood
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 219

Introduction

Survival models
Lifetime distribution functions
Cox regression

ST3054/ST6004 - Survival Analysis

Eric Wolsztynski
[email protected]
Department of Statistics
School of Mathematical Sciences
University College Cork, Ireland

2014-2015
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 and ST6004. However this
document does not reproduce the CT4 notes fully nor exactly, and
also presents notions, developments 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
[email protected]
ST3054 - ST6004

Introduction
Survival models
Lifetime distribution functions
Cox regression

Timetable and assesment


I

ST3054 is part of ST6004

ST3054 is taught in Semester 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 exam in December (80 marks)

ST3054 - ST6004

Introduction
Survival models
Lifetime distribution functions
Cox regression

Module objective and content


I

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
I

Use of software

ST3054 - ST6004

Introduction
Survival models
Lifetime distribution functions
Cox regression

Learning Outcomes
I

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

Define 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 - ST6004

Introduction
Survival models
Lifetime distribution functions
Cox regression

Learning Outcomes
I

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 effect 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 - ST6004

Introduction
Survival models
Lifetime distribution functions
Cox regression

Related material
I

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 - ST6004

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 - ST6004

Introduction
Survival models
Lifetime distribution functions
Cox regression

Introduction

ST3054 - ST6004

Introduction
Survival models
Lifetime distribution functions
Cox regression

Demography & public health


I

How long will we live?

Do men live longer than women?

How do lifestyle factors affect your lifespan?

How long will our children live?

Which people have the longest lifespan?

What implications does an increasing lifespan have?

ST3054 - ST6004

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
1926
2006

0
57.4
76.8

10
55.2
67.2

20
46.4
57.5

35
34.4
43.3

55
19.1
24.8

65
12.8
16.6

75
7.7
9.8

65
13.4
19.8

75
8.4
12.1

Table : Life expectancy (Males)

At Age
1926
2006

0
57.9
81.6

10
54.9
72.0

20
46.4
62.1

35
34.7
47.4

55
19.6
28.5

Table : Life expectancy (Females)


ST3054 - ST6004

11

Introduction
Survival models
Lifetime distribution functions
Cox regression

Life expectancy worldwide


https://www.cia.gov/library/publications/the-world-factbook/rankorder/
2102rank.html

Rank
1
2
3
4
5
6
7
8
9
10

(CIA World Factbook: Country Comparison :: Life expectancy at birth)

Country
Monaco
Macau
Japan
Singapore
San Marino
Andorra
Guernsey
Hong Kong
Australia
Italy

L.E.
89.68
84.43
83.91
83.75
83.07
82.50
82.24
82.12
81.90
81.86

Rank
212
213
214
215
216
217
218
219
220
221

Country
Mozambique
Lesotho
Zimbabwe
Somalia
Central Afr. Rep.
Afghanistan
Swaziland
South Africa
Guinea-Bissau
Chad

L.E.
52.02
51.86
51.82
50.80
50.48
49.72
49.42
49.41
49.11
48.69

ST3054 - ST6004

12

Introduction
Survival models
Lifetime distribution functions
Cox regression

Lifestyle factors

ST3054 - ST6004

13

Introduction
Survival models
Lifetime distribution functions
Cox regression

Insurance & pension

Insurance: pay a lump sum on death

Pension: pay an annuity (fixed amount) till death

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

Calculation of expected cashflow depends on distribution of


human lifetime

Study of distribution of lifetimes is called survival analysis

ST3054 - ST6004

14

Introduction
Survival models
Lifetime distribution functions
Cox regression

Machine reliability
I

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 FT (t)

Machines are not humans: different models are needed

ST3054 - ST6004

15

Introduction
Survival models
Lifetime distribution functions
Cox regression

Biostatistics (clinical studies)

Is a new drug for cancer more effective?

t = 0 is date of diagnosis / injection

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

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


indicators

Regression with S(t) as response

ST3054 - ST6004

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 significance / standard errors

ST3054 - ST6004

17

Introduction
Survival models
Lifetime distribution functions
Cox regression

Types of data
I

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 - ST6004

18

Introduction
Survival models
Lifetime distribution functions
Cox regression

Aggregate model
I

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 Sx (t)

ST3054 - ST6004

19

Introduction
Survival models
Lifetime distribution functions
Cox regression

Select model
I

Person opting for insurance, age x

Want to find S(t)

Sx (10) is different if x = 25 than if x = 55

Survival function is really S(t, x)

x is a concomitant variable, or covariate

Other variables also affect S(t)

Study the effect of other variables on S(t)

Actuarial method: study Sx (t)


ST3054 - ST6004

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 - ST6004

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 - ST6004

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 first 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 - ST6004

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
I

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 < <
I

In practice we have typically [100, 120]

For simplicity, the possibility that an age surpasses is


conveniently excluded
ST3054 - ST6004

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
Definition:
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 Tx be the future lifetime after age x, of a life who


survives to age x, with 0 x and T0 = T

Definition (0 x ):
Fx (t) = P(Tx t)

is the distribution function of Tx

Sx (t) = P(Tx > t) = 1 Fx (t)

is the survival function of Tx


ST3054 - ST6004

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:
I

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

S25 (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 Tx must satisfy the following:
Fx (t) = P(Tx t)
= P(T x + t|T > x)
F (x + t) F (x)
=
S(x)
ST3054 - ST6004

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 qx

qx

probability that someone aged x dies with t years


probability that someone aged x dies within 1 year

t px

probability that someone aged x is still alive after t years

px

probability that someone aged x is still alive after 1 year

In particular we have
t qx

= Fx (t)

t px

= 1 t qx = Sx (t)

ST3054 - ST6004

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
90
91
92
93
94
95
96
97
98
99

lx
9,253
7,218
5,507
4,104
2,982
2,109
1,449
966
623
388

dx
2,035
1,711
1,403
1,122
873
660
483
343
235
155

px
0.78006
0.76297
0.74515
0.72659
0.70730
0.68728
0.66652
0.64503
0.62281
0.59985

qx
0.21994
0.23703
0.25485
0.27341
0.29270
0.31272
0.33348
0.35497
0.37719
0.40015

Table : Irish Life Table No. 14 2001-2003 (Males)

Probability that a 90 year old man survives to 95, i.e. 5 p90 ?


ST3054 - ST6004

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
survive
survive
survive
survive
survive

from
from
from
from
from

90
91
92
93
94

to
to
to
to
to

91
92
93
94
95

Probability
1 p90 = 0.78006
1 p91 = 0.76297
p92 = 0.74515
p93 = 0.72659
p94 = 0.70730

Thus
5 p90

= 1 p90 1 p91 1 p92 1 p93 1 p94 = 0.2278


ST3054 - ST6004

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 p90

= P(90 year old man will survive to 95)

5 p90

5 p90

= (1 p90 1 p91 1 p92 ) (1 p93 1 p94 ) =

3 p90

2 p93

5 p90

= (1 p90 1 p91 ) (1 p92 1 p93 1 p94 ) =

2 p90

3 p92

1 p90

1 p91 1 p92 1 p93 1 p94

s+t px

s px

t px+s

s+t px

t px

s px+t

ST3054 - ST6004

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 p34 or 7 p33 ?

ST3054 - ST6004

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


I

Person opting for insurance, age x

Survival function is really S(t, x)

Actuarial method: study Sx (t) = S(t, x)

Sx (t) is the (select) survival function for the r.v. Tx

Tx is the future (select) lifetime after age x

T = T0 is called the aggregate lifetime

ST3054 - ST6004

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


Sx (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(Tx > t) = P(T > x + t|T > x)
P(T > x + t and T > x)
=
P(T > x)
S(x + t)
=
S(x)
Equivalently,
t px

x+t p0
x p0
ST3054 - ST6004

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 px

x+t p0
x p0

we may thus also derive


s+t px

x+s+t p0
x p0

x+s p0 x+s+t p0
x p0

x+s p0

= s px t px+s

Similary,
s+t px

= t px s px+t

(i.e. the result seen previously on factoring survival probabilities)

ST3054 - ST6004

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) = limh0+ h1 [F (x + h) F (x)] = limh0+ h1 P(x < T x + h)

Figure : Distribution of the random variable T : number of deaths vs age


ST3054 - ST6004

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


Definition: the force of mortality x at age x (0 x ) is
1
x = lim+ P (T x + h|T > x)
h0 h
I

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 qx

Statisticians call it the hazard rate function


ST3054 - ST6004

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 Fx (h) = h qx .
For small h, we can ignore the limit and write
h qx

' 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 - ST6004

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
fluctuations, (ii) rounding errors, (iii) leap years are ignored,(iv) the
1-hour period is still very large for an instantaneous measure.
ST3054 - ST6004

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)
1
h
P(T > x)

thus the 1-1 relationship between x and f (x)


x =

f (x)
dS(x)/dx
=
S(x)
S(x)

d
Inversion: since x = dx
log S(x), we have
 Z x

S(x) = exp
s ds = exp [(x)]
0
ST3054 - ST6004

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


2.0

hazard estimates

1.5

1.0

0.5

0.0
0

20

40

60

80

100

Age (years)

Figure : UK mortality 2003-2005 (Males, Office of National Statistics):


x vs age
ST3054 - ST6004

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


1.0
1

hazard estimates (log scale)

survival estimates

0.8

0.6

0.4

0.2

0.0

.1

.01

.001

.0001
0

20

40

60

80

100

Age (years)

Figure : UK mortality 2003-2005 (Males, ONS): x = d logdxS(x)


 Rx

(increasing) and S(x) = exp 0 s ds (decreasing) vs age
ST3054 - ST6004

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


0.04

hazard estimates (log scale)

Density

0.03

0.02

0.01

0.00

.1

.01

.001

.0001
0

20

40
60
Age (years)

80

100

Figure : UK mortality 2003-2005 (Males, ONS): x (increasing) and f (x)


(unimodal) vs age
ST3054 - ST6004

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


Definition: for x 0 and t > 0, we could define the force of
mortality x+t in two ways:
(1)

x+t

(2)

x+t

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

We often use x+t for a fixed age x and 0 t < x.

ST3054 - ST6004

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 Tx )


By def, the distribution function of Tx is Fx (t). Thus its pdf:


d
d
1
d
fx (t) =
Fx (t) =
P(Tx t) =
S(x + t)
dt
dt
S(x)
dt
1
= lim+ (P(Tx t + h) P(Tx t))
h0 h
P(T x + t + h|T > x) P(T x + t|T > x)
= lim+
h
h0

P(T x + t + h) P(T x)
= lim+
S(x) h
h0

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

S(x) h
P(T x + t + h) P(T x + t)
= lim+
S(x) h
h0
ST3054 - ST6004

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 Tx )


Now by multiplying by S(x + t)/S(x + t) we obtain
S(x + t)
P(T x + t + h) P(T x + t)
lim
S(x + t) h0+
S(x) h
1
= Sx (t) lim+ P (T x + t + h|T > x + t)
h
h0
= Sx (t) x+t

fx (t) =

In actuarial notation, for a fixed age 0 x , this is equivalent


to the following very important relationship
fx (t) = t px x+t

(0 t < x)

ST3054 - ST6004

45

Simple survival model


Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models

Introduction
Survival models
Lifetime distribution functions
Cox regression

Density of select model (pdf of Tx )


Alternatively, we may observe that
fx (t) =



d S(x + t)
1
d
d
Sx (t) =
=
S(x + t)
dt
dt S(x)
S(x)
dt

and since
d
d
S(x + t) =
dt
dt

f (u)du = f (x + t)
x+t

we have
fx (t) =

S(x + t) f (x + t)
f (x + t)
=
= t px x+t
S(x)
S(x) S(x + t)

ST3054 - ST6004

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
Tx

random future lifetime after age x (continuous r.v.)

t qx

probability that someone aged x dies with t years

qx

probability that someone aged x dies within 1 year

t px

probability that someone aged x is still alive after t years

px

probability that someone aged x is still alive after 1 year

Probabilistic notation
x h ' P(T x + h|T > x)
x =

f (x)
S(x)

or f (x) = x S(x)

Actuarial notation
x h ' h qx
fX (t) = x+t t px
s+t px = s px t px+s
( s, t > 0)
ST3054 - ST6004

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 - ST6004

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:
lx

expected number of lives at age x

dx

expected number of deaths between ages x and x + 1

dx

= lx lx+1
lx+1
=
lx

px
qx
t px

= 1 px = 1
=

lx+1
lx lx+1
dx
=
=
lx
lx
lx

lx+t
lx
ST3054 - ST6004

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:
I

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 qx+t = (1 t)qx
This assumption is useful particularly in Cox regression analysis.
ST3054 - ST6004

50

Simple survival model


Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models

Introduction
Survival models
Lifetime distribution functions
Cox regression

Life table: example including life expectancy

...

ST3054 - ST6004

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
0
1
2
3
4
...
109
110

S(x)
1.0000
0.97408
0.97259
0.97160
0.97082
...
0.00001
0.00000

lx
100,000
97,408
97,259
97,160
97,082
...
1
0

Traditional description of survival


function

Start e.g. with radix l = 100, 000

For subsequent ages:


lx = x p l

Survival probabilities:
t px

lx+t
lx

ST3054 - ST6004

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 l58.25 assuming a uniform distribution of deaths between
exact ages 58 and 59, from the English Life Table 15 (Males):
Age x
58
59

lx
88,792
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 - ST6004

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 qx

= t qx

for 0 t 1.

ST3054 - ST6004

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
lx+t = (1 t)lx + t lx+1
for 0 t 1. So
t qx

lx+t
lx
(1 t)lx + t lx+1
= 1
lx
t lx t lx+1
=
lx
= t(1 px )

= 1

= t qx
ST3054 - ST6004

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 qx 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.
Definition: The central rate of mortality mx defined as
mx = R 1

dx

0 lx+t dt

= R1

qx

0 t px dt

This alternative represents the probabilityRthat a life alive between


1
ages x and x + 1 dies. The denominator 0 t px dt represents the
expected amount of time spent alive between ages x and x + 1 by
a life alive at age x.
ST3054 - ST6004

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: mx 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.
mx 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 definition of mx
must be adjusted accordingly.
ST3054 - ST6004

57

Simple survival model


Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models

Introduction
Survival models
Lifetime distribution functions
Cox regression

Initial and central rates of mortality


If x+t is a constant, , between ages x and x + 1, then
mx = R 1

qx

0 t px dt

R1
=

t px dt

R0 1

0 t px 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 mx can never be less than qx .
ST3054 - ST6004

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 - ST6004

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


Definition: The expected future lifetime after age x (or
expectation of life at age x) is defined as E[Tx ] and is denoted
ex :
Z x

ex =
t t px x+t dt
0

Z x 

=
t t px dt
t
0
ix Z x
h
= t t px
+
(integration by parts)
t px dt
0
0
Z x
=
t px dt
0
h
ix
(using t px x+t = fx (t) = t qx /t = t px /t and t t px
= 0)
0

ST3054 - ST6004

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


Definition: The curtate future lifetime of a life aged x is
Kx = [Tx ], where the square brackets [.] denote the integer part.
Kx is a discrete r.v. taking values on {0, 1, 2, . . . , x}, with
probability function
P(Kx = k) = P(k Tx < k + 1)
= P(k < Tx k + 1)
=

k px

(assuming Fx (t) is continuous in t)

qx+k

P(Kx = k) is often denoted k| qx (k deferred qx ), as we consider


here deferring the event of death until the year that begins in k
years from now.
ST3054 - ST6004

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


Definition: The curtate expectation of life, denoted ex , is
ex = E[Kx ]
We have
[x]

ex

=
=

k k px
k=0
1 px qx+1

qx+k

+2 px qx+2 + 2 px qx+2
+3 px qx+3 + 3 px qx+3 + 3 px qx+3
+...
X X

[x] [x]

k=1

j=k

[x]
j px qx+j =

k px

k=1
ST3054 - ST6004

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
from age X
1
2
...
k
...
Sum

Probability
1 px

qx+1
(survives one year and then dies in the next year)
2 px qx+2
...
k px qx+k
...
P
k px qk+1 (k = 1 to x)

ST3054 - ST6004

63

Simple survival model


Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models

Introduction
Survival models
Lifetime distribution functions
Cox regression

Relationship between
ex and ex
Considering the two formulae
Z

ex =

[x]

x
t px dt

and

ex =

k px

k=1

the complete and curtate expectations of life are related by the


approximate equation
1

ex = ex +
2
I Define Jx = Tx Kx to be the random lifetime after the highest
integer age to which a life x survives. Approximately, E[Jx ] = 1/2
(assuming deaths occur uniformly within each year of age), and
since E[Tx ] = E[Kx ] + E[Jx ], we have
ex ' ex + 1/2.
ST3054 - ST6004

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 - ST6004

65

Introduction
Survival models
Lifetime distribution functions
Cox regression

Life table: example 3

Simple survival model


Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models

Why
e81 6=
e80 1?
How would you write e81 w.r.t e80 and px ?

Figure : Irish Life Table No. 13, 1995-97 (Males), continued

ST3054 - ST6004

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
Z x
Var[Tx ] =
t 2 t px x+t dt
ex2
0
[x]

Var[Kx ] =

k 2 k px qx+k dt ex2

k=0

These expressions may be useful to:


I

derive the variance of functions based on future lifetimes

further quantify the likely variation in some index of interest


(e.g. the profits from a life insurance policy, or the cost of
providing a benefit from a pension scheme)
ST3054 - ST6004

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
40-45
45-50
50-55
55-60
60-65
65-70
70-75
85-80

Angola, Zambia
Afghanistan, Malawi
Nigeria, Rwanda, South Africa, Zimbabwe
Cameroon, Ethiopia, Uganda
Bangladesh, Ghana, Haiti, Kenya, Russia
Botswana, Burma, Guyana, Pakistan, Yemen
Brazil, Guatemala, India
Barbados, China, Serbia
Australia, Japan, New Zealand, USA,
most Western European countries

Average life expectancy at birth for males (2009, CIA World Factbook and IFA 2011)
ST3054 - ST6004

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 - ST6004

69

Simple survival model


Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models

Introduction
Survival models
Lifetime distribution functions
Cox regression

A formula for t qx
Z
t qx

t
s px x+s ds

This follows from the relationship fx (t) = t px x+t . For each time
s [0, t], the integrand is the product of
(i) s px , the probability of surviving to age x + s
(ii) x+s , which is approximately equal to
of dying just after age x + s

ds qx+s ,

the probability

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 px and x .
ST3054 - ST6004

70

Simple survival model


Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models

Introduction
Survival models
Lifetime distribution functions
Cox regression

A formula for t px

t px

 Z t

= exp
x+s ds + c
0

ST3054 - ST6004

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 px
Proof: This follows from

s px =
s qx = fx (s) = s px x+s
s
s
Note that

s px
log s px = s
= x+s
s
s px
hence, for some constant of integration c (which is 0),
Z t
Z t

log s px ds =
x+s ds + c
0
0 s
h
it
Since 0 px = 1 we have log s px = log t px and
0
Z t
Z t
x+c ds + c} = exp{
x+c ds}
t px = exp{
0

(since e 0 = 1, we use c = 0)
ST3054 - ST6004

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 qx and t px

Rt

t qx

0 s px x+s ds

t px

n R
o
t
= exp 0 x+s ds + c

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

ST3054 - ST6004

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 - ST6004

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?
1.0
1

hazard estimates (log scale)

survival estimates

0.8

0.6

0.4

0.2

0.0

.1

.01

.001

.0001
0

20

40

60

80

100

Age (years)

Figure : UK mortality 2003-2005 (Males, Office of National Statistics):


x (increasing) and S(x) (decreasing) vs age I WHAT MODEL?
ST3054 - ST6004

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?
0.04

hazard estimates (log scale)

Density

0.03

0.02

0.01

0.00

.1

.01

.001

.0001
0

20

40
60
Age (years)

80

100

Figure : UK mortality 2003-2005 (Males, Office of National Statistics):


x (increasing) and f (x) (unimodal) vs age I WHAT MODEL?
ST3054 - ST6004

76

Simple survival model


Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models

Introduction
Survival models
Lifetime distribution functions
Cox regression

The exponential model


I

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
h it
t px

= Sx (t) = e

Rt
0

ds

= e

= e t

and
t qx

= 1 t px = 1 e t
ST3054 - ST6004

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
1
E[T ] =

1
Var[T ] =
2

Not appropriate for human survival over broad ranges

Can be used over short ranges

Is used for machine reliability


ST3054 - ST6004

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 p0 = 0.5. What does this age represent?

Q3 Given that e50 = 30 and 50+t = 0.005 for 0 t 1, what is


the value of e51 ?

ST3054 - ST6004

79

Simple survival model


Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models

Introduction
Survival models
Lifetime distribution functions
Cox regression

The exponential model


1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
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 - ST6004

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


I

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 - ST6004

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

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

t =

d
[t 1 ] = t 1
dt

Weibull is a special case of Gamma distribution

Its moments can be calculated relatively easily

ST3054 - ST6004

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)


I

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


B

S(t) = e log(c)
t
I

(1c 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 - ST6004

83

Simple survival model


Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models

Introduction
Survival models
Lifetime distribution functions
Cox regression

The Gompertz distribution (1825)

hazard estimates

.1

.01

.001

.0001
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 - ST6004

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)


I

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


B

S(t) = e log(c)
t

(1c t )At

= 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 - ST6004

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 - ST6004

86

Simple survival model


Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models

Introduction
Survival models
Lifetime distribution functions
Cox regression

Survival probabilities
Survival probabilities t px can be found using
 Z t

x+s ds
t px = exp
0

Gompertz law: for g = exp


t px

= gc

Makehams law: for g = exp


t px

B
log(c)

, we have

x (c t 1)

B
log(c)

= stg c

and s = exp(A), we have

x (c t 1)

ST3054 - ST6004

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 - ST6004

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) = poly1 (t) + e poly2 (t)
where t is a linear function of x and poly1 (t) and poly2 (t) are
polynomials of degrees r and s respectively.
ST3054 - ST6004

89

Simple survival model


Life table functions
Expected future lifetime
Some important formulae
Simple parametric survival models

Introduction
Survival models
Lifetime distribution functions
Cox regression

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
f (t)

Weibull
t

F (t)

1 e t

1 e t

S(t)

e t

e t

t 1

Gompertz

1 t

Bc e
1e
e

B(1c t )
log(c)
B(1c t )
log(c)

B(1c t )
log(c)

Bc t

Makeham
t

(A+Bc )e
1e
e

Log-logistic

B(1c t )
log(c)

B(1c t )
At
log(c)

B(1c t )
At
log(c)

A+Bc t

t 1
(1+t )2

1
1+t

1
1+t
t 1
1+t

ST3054 - ST6004

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 - ST6004

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 - ST6004

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 - ST6004

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 - ST6004

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
I

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 confidence intervals

The possibility of incomplete data will also be considered

Defining a decrement of interest by death can easily be


extended to the analysis of other decrements such as sickness,
mechanical breakdowns, etc.
ST3054 - ST6004

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 - ST6004

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:
I

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 - ST6004

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 - ST6004

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:
I

No prior assumption about the distribution shape or form

Use the data to estimate this shape/form

Parametric approach:
I

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 - ST6004

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.
I

A larger sample yields a smoother estimate

Further smoothing also possible

ST3054 - ST6004

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
5
10
15
20
20
20
35
40
40
40

Died
1
1
1
1
1
1
1
0
0
0

Alive
9
8
7
4
4
4
3
3
3
3

SDF
0.9
0.8
0.7
0.4
0.4
0.4
0.3
0.3
0.3
0.3

ST3054 - ST6004

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
1.0
0.9
0.8

survival

0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
0

10

15

20
Time

25

30

35

40

Figure : Observed proportion S(t)


surviving a given time t
ST3054 - ST6004

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
Note step down of 0.1
Empirical Survival
1.00

0.75

0.50

Note step down of 0.3


(3 deaths)

0.25

Note 3 of the 10 (0.3) are still


alive at 40 months.

0.00
0

10

20
analysis time

30

40

Figure : Observed proportion S(t)


surviving a given time t
ST3054 - ST6004

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:
I

Difficult to find 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 - ST6004

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
I

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 first

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

No entrants after t = 0

All are observed until failure/death:


I

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 - ST6004

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
I

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


A
B
1/1/90

1/1/91

1/1/92

A
B
0

365

730
ST3054 - ST6004

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 - ST6004

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
I

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 - ST6004

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:
I

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 - ST6004

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 - ST6004

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).
I

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 - ST6004

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):
I

Right censoring

Left censoring

Interval censoring

Random censoring

Informative and non-informative censoring

Type I censoring

Type II censoring
ST3054 - ST6004

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
I

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 - ST6004

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 - ST6004

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
I

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 different to left truncation


ST3054 - ST6004

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 - ST6004

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
I

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 - ST6004

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 - ST6004

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
I

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 - ST6004

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 - ST6004

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
I

Censoring is random if the time Ci at which observation of the


i th lifetime is censored is a random variable

Obs will be censored if Ci < Ti where Ti 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 - ST6004

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 - ST6004

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


I

Censoring is non-informative if it gives no information about


the lifetimes {Ti }

If random censoring: the independence of each pair Ti , Ci is


sufficient to ensure non-informative censoring

Informative censoring is more difficult to analyse

Essentially this is because the resulting likelihoods cannot


usually be factorised (recall that statistical independence
greatly simplifies calculation of likelihoods)

ST3054 - ST6004

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:
I

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 - ST6004

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:


I

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


equally, regardless of their propensity to die at that point

ST3054 - ST6004

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 {Ci } 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 - ST6004

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:
I

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 10th 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 - ST6004

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
I

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 effect on the analysis in


specifying this plan

Censoring might also depend on the results of the


observations to date (oncologic trials)
ST3054 - ST6004

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


I

Many actuarial investigations are characterised by a


combination of random and Type I censoring

Ex: in life office 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 - ST6004

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 - ST6004

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


I

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 suffering from a virulent tropical disease.
ST3054 - ST6004

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


I

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 - ST6004

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


I

Define t0 = 0 and tk+1 = and let t1 < < tk , 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 dj deaths are observed at time tj (1 j k) so that


d1 + + dk = m

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


these remaining lives are not tracked further)

ST3054 - ST6004

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 cj lives are censored (i.e. removed from investigation)


between times tj and tj+1 (0 j k)

Then c0 + c1 + + ck = n m

Let dj be the number of individuals experiencing the event at


duration tj

Let nj be the risk of experiencing the event just prior to


duration tj

ST3054 - ST6004

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
d
duration tj when an event takes place is equal to njj
(c) For any 0 j k, if cj > 0, then
I

If dj = 0, the persons censored are removed from observation


at duration tj (at which censoring takes place)

If dj > 0, persons who are censored at tj are assumed to be


censored immediately after the events have taken place (so
that they are still at risk at that duration)
ST3054 - ST6004

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
3
4
6
11
17
21
24
25
26
30

Event
Rat 4 dies from effects of drug
Rat 13 dies from effects of drug
Rat 7 gnaws through bars of cage and escapes
Rats 6 and 9 die from effects of drug
Rat 1 killed by other rats
Rat 10 dies from effects of drug
Rat 8 freed during raid by animal liberation activists
Rat 12 accidentally freed by journalist reporting earlier raid
Rat 5 dies from effects of drug
Investigation closes. Remaining rats hold street party.
ST3054 - ST6004

136

Introduction
Survival models
Lifetime distribution functions
Cox regression

censored
Day
died

Day
3
4
6
11
17
21
24
25
26
30

6
34

t1 t2

Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function

24 25

17
11 (2 rats)
t3

21
t4

30 (5 rats)

26
t5

Event
Rat 4 dies from effects of drug
Rat 13 dies from effects of drug
Rat 7 gnaws through bars of cage and escapes
Rats 6 and 9 die from effects of drug
Rat 1 killed by other rats
Rat 10 dies from effects of drug
Rat 8 freed during raid by animal liberation activists
Rat 12 accidentally freed by journalist reporting earlier raid
Rat 5 dies from effects of drug
Investigation closes. Remaining rats hold street party.

ST3054 - ST6004

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


I

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

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


observed: t1 = 3, t2 = 4, t3 = 11, t4 = 21, t5 = 26

Number of deaths observed at each failure time:


d1 = 1, d2 = 1, d3 = 2, d4 = 1, d5 = 1

n m = 9 lives did not die due to drugs

Number of lives censored:


cP
0 = 0, c1 = 0, c2 = 1, c3 = 1, c4 = 2, c5 = 5
( kj=0 cj = n m)

Number of lives and at risk at time ti :


n1 = 15, n2 = 14, n3 = 12, n4 = 9, n5 = 6
ST3054 - ST6004

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


I

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 offers 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 - ST6004

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


I

Recall that if x+t = , then Sx (t) = t px = 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 tj is


estimated for 1 j k as
j = dj

nj

This is a non-parametric MLE that maximises


k
Y

j j (1 j )nj dj

(product of independent binomial likelihoods)

j=1
I

In eventless intervals, dj = 0 and the hazard becomes 0


ST3054 - ST6004

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

Definition: Suppose F (t) has probability masses ar the points


t1 , . . . , tk . Then the discrete hazard function is defined as
j = P[T = tj |T tj ]

(1 j k)

j may be seen as the proba that a given individual dies on


day tj , given that they were still alive at the start of that day

ST3054 - ST6004

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: butterflies of a certain species have short lives. After hatching,
each butterfly experiences a lifetime defined by the following
probability distribution:
Lifetime (days)
1
2
3
4
5

Probability
0.10
0.30
0.25
0.20
0.15

Calculate j for j = 1, 2, ..., 5 (to 3 decimal places) and sketch a


graph of the discrete hazard function.
ST3054 - ST6004

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
Y
1 F (t) =
(1 j )
tj t

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


the formula
Y

j )
S(t)
=
(1
tj t

This is the Kaplan-Meier estimator.

ST3054 - ST6004

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 tj is estimated by
j = nj dj = number of survivors
1
nj
number at risk
So the probability of survival at time t is estimated by

S(t)
=

Y nj dj
nj

tj t

The KM estimate is also called the product limit estimate as a


result of this expression.
ST3054 - ST6004

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:
I

Finer and finer 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 = tj |T tj ], 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 defined at durations longer than
the duration of the last censored observation

Only those at risk at {tj } contribute to the estimate


ST3054 - ST6004

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 - ST6004

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

tj

dj

nj

j = dj /nj

j )
(1

15

0.0667

0.9333

0.0667

14

0.0714

0.9286

0.1333

11

12

0.1667

0.8333

0.2778

20

0.1111

0.8889

0.3580

26

0.1667

0.8333

0.4650

0.0667

0.1333
F (t) =
0.2778

0.3580

0.4650

for
for
for
for
for
for

Qj

0t<3
3t<4
4 t < 11
11 t < 21
21 t < 26
t 26

k=1 (1

k )

ST3054 - ST6004

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 - ST6004

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)

1.00

Estimate of the survival function

0.75

S(t)
1
14/15
14/1513/14
13/1510/12
...

0.25

0.50

t
0t<3
3t<4
4 t < 11
11 t < 21
...

0.00

Survival probability

34

11

21

26

30

Time

ST3054 - ST6004

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


I

Ex: compare lifetime distributions of two populations


following different drug treatments

Use statistical properties of KM estimates for comparison

Greenwoods formula for MLE F :


h
i 
2 X
Var F (t) 1 F (t)
tj t

dj
nj (nj dj )

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 - ST6004

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 defined 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 - ST6004

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 confidence intervals for KM estimator


q

Z1/2 Var[S(x)]

where = exp

S(x)
log(S(x))

This CI is not
symmetric about S(t)

Bands can be
constructed by
adjusting conf level

0.0

0.2

0.4

S(t)

0.6

0.8

1.0

h
i
1/ , S(x)
,
S(x)

50

100

150

> leuk.surv = survfit(Surv(time)0, data=leukemia)


> plot(leuk.surv,xlab="t",ylab="S(t)",bty="n")
ST3054 - ST6004

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


I

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):


Z t
X
t =
s ds +
j
0

tj t

Nelson-Aalen estimate of integrated hazard:


t =

X dj
tj t

nj
ST3054 - ST6004

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


I

aka Fleming-Harrington method in R

Nelson-Aalen estimate of the survival function:

S(t)
= e t

Nelson-Aalen estimate of the distribution function:

F (t) = 1 e t

Its variance is given by


h i X d (n d )
j j
j
t
Var
3
nj
t t
j

ST3054 - ST6004

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



Y
dj
FKM (t) = 1
1
nj
tj t

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

FKM (t) 1 e t = FNA (t)

ST3054 - ST6004

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 - ST6004

156

Introduction
Survival models
Lifetime distribution functions
Cox regression

Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function

1.0

Survival estimation in R

0.0

0.2

0.4

S(t)

0.6

0.8

Censoring
No censoring

50

100

150

ST3054 - ST6004

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 - ST6004

158

Introduction
Survival models
Lifetime distribution functions
Cox regression

Statistical inference
Censoring
The Kaplan-Meier (product-limit) model
Parametric estimation of the survival function

1.0

KM vs NA

0.0

0.2

0.4

S(t)

0.6

0.8

KaplanMeier
NelsonAalen

50

100

150

ST3054 - ST6004

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 differences in survival curves

Here the 2 subpopulations (low risk vs high risk of H&N cancer)


appear to be different. Is it a statistically significant difference or
due to too small a sample size?
ST3054 - ST6004

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 differences in survival curves


I

Various tests allow to test for differences in survival curves

The log-rank test and the generalised Wilcoxon test are


popular nonparametric tests

Let us denote:
- K the number of categories
- dk,(i) the number of deaths in group k at ordered time t(i)
P
- d(i) = K
k=1 dk,(i) the total number of deaths at time t(i)
- nk,(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 - ST6004

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


I

Hypotheses:
H0 :

S1 (t) = S2 (t)

H1 :

S1 (t) 6= S2 (t)

Under H0 , the expected number of deaths in group k at time


t(i) is
nk,(i) d(i)
ek,(i) =
n(i)

Assumptions:
I
I
I

censoring is independent of group


Pm
i=1 d(i) is large
Pm
i=1 ek,(i) is large
ST3054 - ST6004

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


I

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


v(i) =

n1,(i) n2,(i) d(i) (n(i) d(i) )


2 (n
n(i)
(i) 1)

Given a set of weights {wi }, the test-statistic is


Pm
q=

1,(i) )
i=1 wi (d1,(i) e
Pm
2
(i)
i=1 wi v

2

If H0 is true then q X12 asymptotically, and the p-value


follows this cdf:
p = P(Q > q|H0 true)
ST3054 - ST6004

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


I

Several tests are defined by the choice of weights

For the log-rank test, we use wi = 1

For the generalised Wilcoxon test, we use wi = n(i)

The Tarone-Ware test uses wi =

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)

n(i)

ST3054 - ST6004

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 - ST6004

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


I

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 - ST6004

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 - ST6004

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
!
!



Pk
Pn
Y
Y
f (ti )
S(ti ) = k e i=1 ti
e i=k+1 ti
deaths

censored lives

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


L() = k e

Pn

i=1 ti

and the MLE of is defined as

= arg max L()

ST3054 - ST6004

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:
n
Y
L=
f (ti )i S(ti )1i
i=1

and since f (t) = S(t)h(t),


L=

n
Y
i=1

h(ti ) S(ti ) S(ti )

1i

n
Y

h(ti )i S(ti )

i=1

Note also that


arg max L = arg max log(L)
ST3054 - ST6004

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 finding the optimum of
log(L). Now substituting for the exponential case:

log(L()) =

and

Pn

i=1 i

n
X

ti

i=1

Pn
i
Pi=1
n
i=1 ti

This indeed coincides with a maximum for L() since


Pn
2 log(L())
i=1 i
=

<0
2
2
ST3054 - ST6004

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


I

Repeat parametric estimation over years of age to obtain a


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

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


x
2p

= Sx (1) Sx+1 (1) = e x e x+1

Probability of surviving m years is therefore


x
mp

= Sx (m) = e

Pm1
j=0

x+j

Use this chaining to evaluate probabilities over any age range

ST3054 - ST6004

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
A
B
C
D
E

Date of surgery
1 April 2001
1 April 2001
1 May 2001
1 September 2001
1 October 2001

Date of death
1 August 2005
1 October 2001
1 March 2002
1 August 2003
1 August 2002
ST3054 - ST6004

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
F
G
H
I
J
K
L

Date of surgery
1 February 2001
1 March 2001
1 April 2001
1 June 2001
1 September 2001
1 September 2001
1 November 2001

ST3054 - ST6004

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
M
N
O

Date of surgery
1 February 2001
1 June 2001
1 September 2001

Date of last check-up


1 August 2003
1 March 2002
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 - ST6004

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 - ST6004

175

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

III.1 Modelling approach

ST3054 - ST6004

176

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Effect of covariates
I

One may need to study the effect 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 effect of covariates on lifetime

How do we model this effect on lifetimes?

Lets first follow a parametric approach to study the effect of


one variable

ST3054 - ST6004

177

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Log-linear hazard models


I

Model Ti for individual i? One constraint: Ti 0

Model log-hazard to avoid constraints

Log-linear hazard model for the hazard rate function:


log(Ti ) = xi + i
where models the effect of covariate xi and i is some noise

A general expression for the lifetime is


Ti = T0,i e xi +i

Usually, estimate parameters via maximum likelihood


ST3054 - ST6004

178

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Log-linear hazard models


I

Ex: model Ti ' T0,i e xi with a dummy variable x

Factor with 2 levels (groups 1 and 2): x1 = 0 and x2 = 1

Then T1 = T0,1 and T2 = T0,2 e

Say = log(2), then T2 = 2T0,2

If T0,1 = T0,2 (same population a priori), then T2 = 2T1

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

We also have S2 (t) = S1 (t/2) (proportional survival)

ST3054 - ST6004

179

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Log-linear hazard models


I

Different kinds of parametric models are obtained by assuming


different error distributions

Assuming Gaussian noise yields log-normal lifetimes (Tobit)

Assuming i f (u) = e (ue ) yields the exponential


distribution with constant hazard rate

log(i ) = xi
I

Extend log-hazard model using a proportional hazard rate:


i (t) = (t)e xi
ST3054 - ST6004

180

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Log-linear hazard models


I

Different kinds of proportional hazards models are obtained by


assuming different kinds of baseline hazard functions

Ex: (t) = 0 yields the exponential regression model with


(t, xi ) = 0 e xi

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 - ST6004

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


I

Take 2 lives with covariate values x1 = 0, x2 = 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:

Sign() indicates whether 1 > 2 or 2 > 1

We obtain the following Hazard ratio or relative risk

1 (t) = e ,

2 (t) = e e

2 (t)
= e
1 (t)
I

Generalisation: let x be a vector of covariates


ST3054 - ST6004

182

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Limitations of parametric models


I

Parametric models assume a fixed shape for the lifetime


distribution

These various models suit specific 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 - ST6004

183

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

III.2 The Cox model

ST3054 - ST6004

184

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Proportional hazards
Definition: Given a set of p-dimensional vectors of covariates
{xi }ni=1 , the Cox model (1972) defines the hazards function as
(t; xi ) = 0 (t) exp(xiT )
where is a p-dimensional vector of regression parameters, and
o (t) is the baseline hazard.
I

The baseline hazard represents a hazard pattern (shape)


common to the whole population

The individual effect of the p covariates is determined by the


product xiT for each individual
ST3054 - ST6004

185

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Proportional hazards
I

With the Cox model, each life is attributed a hazard


proportional to the baseline hazard

Differences between individuals are determined by the


covariates xi (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(xiT ):


I

ensures a positive hazard

yields a linear log-hazard


ST3054 - ST6004

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 different lives are
proportional at all times:
exp(x1T )
(t; x1 )
=
(t; x2 )
exp(x2T )

Hazard

does not depend on t.

Time

ST3054 - ST6004

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:
P


p
p

x
exp
T
X
j
1,j
j=1
exp(x1 )
(t; x1 )
P
 = exp
j (x1,j x2,j )
=
=
T
p
(t; x2 )
exp(x2 )
j x2,j
exp
j=1

Hazard

j=1

Time

ST3054 - ST6004

188

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Effect of covariates on risk


I

In exp(x T ), determines the contribution of the vector of


covariates x to the hazard rate

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

The magnitude of j determines the strength of this


correlation: a large j implies a significant 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 significance of each covariate can be tested statistically


ST3054 - ST6004

189

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Effect of covariates on risk: example


I

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 - ST6004

190

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

The Cox model in practice


I

The Cox model separates baseline hazard and individual effect

This allows to focus on estimating the effect of covariates

One can estimate from the data while ignoring 0 (t)


(nuisance parameter)

Semi-parametric approach: distribution of failure is unspecified

Estimating (t, xi ) 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, coffee shortens life by 6 months
ST3054 - ST6004

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

Hazard

Time

ST3054 - ST6004

192

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

III.3 Cox regression

ST3054 - ST6004

193

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Likelihood in the Proportional Hazard Model


I

Generic form of likelihood for right-censored data:


Y
Y
lik =
i (t, x)
Sj (t, x)
idead

jall

Substituting the PHM:


Y
Y
xj R tj
0 0 (s)ds
L(0 , ) =
0 (ti )e xi
e e
idead

jall

Simultaneous maximization is not possible

Fix first and maximize w.r.t. 0 (t) (profile likelihood)

Likelihood is max when 0 (t) = 0 except at t = ti

Define 0i = 0 (ti ), then substitute back into likelihood


ST3054 - ST6004

194

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

ML wrt the baseline hazard


I

The profile likelihood can be rewritten as


Y
X
L(01 , ..., 0D ) =
0i
e xj
idead

jRi

The profile MLE of 0i becomes


0i = P 1

jRi

e xj

This is Breslows estimator of the baseline hazard

Substituting the estimator in the overall likelihood, we get a


profile likelihood estimator for , known as the partial
likelihood
ST3054 - ST6004

195

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

The partial likelihood


T

We focus now on estimating the term e xi (and thus


= (1 , ..., p )) describing individual mortalities in the Cox model.
I

This is usually done via partial maximum likelihood

Assume for now that one event only occurs at each


observation time point tj , 1 j k

Partial likelihood:
L() =

k
Y
j=1

e xj
P

iRj

e xi

where Rj denotes the set of lives alive at risk at time tj


I

Cox showed (1975) that the usual likelihood methods apply


ST3054 - ST6004

196

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

The partial likelihood


Recall that (t, xi ) denotes the hazard rate (or force of mortality)
for the ith life at risk. Partial Likelihood is thus
L() =

k
Y

(t, xj )
iRj (t, xi )

P
j=1

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 - ST6004

197

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

The partial likelihood


I

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


Rj for any tj

Corresponds to assuming censoring occurs after events

ST3054 - ST6004

198

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Two-sample example
I

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:




e
e 0
e 0
Lp =
3e 0 + 2e
e 0 + 2e
e 0 + e





1
e
1
=
3e 0 + 2e
1 + 2e
1 + e

Likelihood must be maximised by numerical methods


ST3054 - ST6004

199

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Partial likelihood for ties


I

The model must also allow for multiple events at one time
point tj (i.e. dj > 1)

The general partial likelihood for ties is:

Lp () =

xj (y(i) )

e jD(i)



P
P

jD xj (y(i) )
(i)
(i)
e
R
combinationsD(i)
(i)

Computationally very expensive if many ties

In practice, use an approximation like Breslows or Efrons


ST3054 - ST6004

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(x3 and x4 fail at 18 | 2 failures at 18))
0 (18)e x3 0 (18)e x4
+ 0 (18)e x4 0 (18)e x5 + 0 (18)e x3 0 (18)e x5

0 (18)e x3 0 (18)e x4
e .0+.1
= .0+.1
e
+ e .1+.1 + e .0+.1

Thus,


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



e
1
=
3 + 2e
2e + e 2


Lp =

ST3054 - ST6004

201

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Partial likelihood for ties


I

Approximate partial likelihood using Breslows approximation

In this case we maximise


L() =

k
Y
j=1

e sj
P

iRj

e xi

d j

where sj is the sum of the covariate vectors x of the dj lives


that experienced an event at time tj .
I

Breslows approx treats ties as nearly equal, but distinct


observations

Other approximations are available, e.g. Efrons


ST3054 - ST6004

202

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Properties of the partial likelihood


I

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 defined for 1 i, j p by
Mij =

2 log L()
i j

This variance is typically computed to construct confidence


bounds on
ST3054 - ST6004

203

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Cox regression
I

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:

1 for treatment B
X1 =
0 otherwise

1 for treatment C
X2 =
0 otherwise
ST3054 - ST6004

204

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Cox regression
I

Use 2 dummy covariates to model X =treatment type for


three treatments A, B and C:

1 for treatment B
X1 =
0 otherwise

1 for treatment C
X2 =
0 otherwise

The hazard rate (t, x) = 0 (t) e X = 0 (t) e 1 X1 +2 X2 then


covers all possible cases

The hazard rate (t, x) = 0 (t) corresponds to the baseline


case of a patient receiving treatment A

ST3054 - ST6004

205

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Cox regression: example


I

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


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

1 for males
X1 =
0 for females

1 for treatment B
X2 =
0 otherwise

1 for treatment C
X3 =
0 otherwise

The regression parameters are estimated to be


= (0.031, 0.025, 0.011)
ST3054 - ST6004

206

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Cox regression: example


I

The baseline profile 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)
= e 0.025 = 1.0253
female,B (t)
so the risk of an event is estimated to decrease by 2.53%
when using treatment B instead of A for female patients.

ST3054 - ST6004

207

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Cox regression: example


I

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)
= e 0.042 = 0.9589
male,C (t)
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 - ST6004

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)
1
2
3
4
5

wbc
2300
750
4300
2600
6000

ag time
present 65
present 156
present 100
present 134
present 16

leuk.cox <- coxph(Surv(time)ag+log(wbc), data=leuk);


summary(leuk.cox)
ST3054 - ST6004

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)
agpresent
log(wbc)

coef
-1.069
0.368

exp(coef)
0.343
1.444

agpresent
log(wbc)

exp(coef)
0.343
1.444

se(coef)
0.429
0.136

exp(-coef)
2.913
0.692

z
-2.49
2.70

lower .95
0.148
1.106

p
0.0130*
0.0069**

upper .95
0.796
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 significant


ST3054 - ST6004

210

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

III.4 Model selection

ST3054 - ST6004

211

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Effect of covariates
I

The effect of a covariate may be studied by incorporating this


covariate to an existing model with p covariates

One would then fit two Cox models with different sets of
covariates (having p and p + 1 covariates)

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

Convenient when fitting the models using maximum likelihood

Then just compare the two maximum likelihoods Lp and Lp+1

Generalizes to the case of adding q covariates:


compare Lp and Lp+q
ST3054 - ST6004

212

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Likelihood ratio test


I

The likelihood ratio statistic is defined as


2(Lp Lp+q )

Define H0 : the extra q covariates do not have an effect in the


presence of the other p covariates, i.e.
H0 : p+1 = p+2 = = p+q = 0

This test statistic has an asymptotic 2q distribution

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

ST3054 - ST6004

213

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Model selection
I

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-significant covariates

One must also test for interactions between covariates

The LRT test is a very common model selection tool in


statistical applications
ST3054 - ST6004

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)

NULL
ag
log(wbc)

loglik
-85.054
-80.924
-77.234

Chisq

Df

8.2612
7.3799

1
1

Pr(>|Chi|)
0.004050**
0.006596**

ST3054 - ST6004

215

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Proportional hazards model checking in R

0.05

0.10

0.20

0.50

1.00

2.00

5.00

leuk.cox2=coxph(Surv(time)strata(ag)+log(wbc), data=leuk)
plot(survfit(leuk.cox2), fun="cumhaz", log=T, lty=c(1,4))

50

100

150

ST3054 - ST6004

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:


0 (ti )
riM = i exp T xi H
q
riD = sign(riM ) 2(riM i log (i riM ))

scatter.smooth(leuk$wbc,resid(leuk.cox))
plot(1:length(leuk$time), resid(leuk.cox,type="deviance"))

ST3054 - ST6004

217

Introduction
Survival models
Lifetime distribution functions
Cox regression

Modelling approach
The Cox model
Cox regression
Model selection

Residual diagnostics

deviance residuals

-1

-1

-3

-2

-2

martingale residuals

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

log(wbc)

8 e+04

1 e+05

10

15

20

25

30

index

ST3054 - ST6004

218

Introduction
Survival models
Lifetime distribution functions
Cox regression

References
[1] CT4 course notes, The Actuarial Education Company, Institute and Faculty of Actuaries, 2011
[2] Kaplan, E. L. and P. Meier, Non- parametric Estimation from Incomplete Observations. J. Am. Stat. Assoc.,
53:457481, 1958
[3] D. P. Harrington and T. R. Fleming, A class of rank test procedures for censored survival data, Biometrika,
69:553566, 1982
[4] S.R. Deshmukh, Actuarial Statistics: An Introduction Using R, Universities Press
[5] J.D. Gibbons and S. Chakraborti, Nonparametric Statistical Inference, 4th Edition, Dekker
[6] Alex R. Cooks ST3242 lecture notes, National University of Singapore
http://courses.nus.edu.sg/course/stacar/internet/st3242/st3242.html
[7] B. S. Everitt and T. Hothorn, A Handbook of Statistical Analyses Using R, Second Edition, Chapman & Hall
2010
[8] M. J. Crawley, Statistics: an Introduction Using R, Wiley 2005

For any comments or queries about this document, please contact [email protected]
ST3054 - ST6004

219

You might also like