Top Banner
Flexible Parametric Alternatives to the Cox Model Paul C Lambert 1,2 and Patrick Royston 3 1 Department of Health Sciences, University of Leicester, UK 2 Medical Epidemiology & Biostatistics, Karolinska Institutet, Stockholm, Sweden 3 MRC Clinical Trials Unit, London, UK UK Stata User Group 2009 London, 11th September 2009 Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 1/52 Outline 1 The stpm2 command 2 Why We Need Flexible Models 3 Time-Dependent Effects 4 Quantifying Differences 5 Average Survival Curve 6 Attained Age as the Time-Scale 7 Relative Survival 8 Crude Mortality Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 2/52
30

Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Jul 18, 2018

Download

Documents

dinhnhi
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Flexible Parametric Alternativesto the Cox Model

Paul C Lambert1,2 and Patrick Royston3

1Department of Health Sciences, University of Leicester, UK2Medical Epidemiology & Biostatistics, Karolinska Institutet, Stockholm, Sweden

3MRC Clinical Trials Unit, London, UK

UK Stata User Group 2009London, 11th September 2009

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 1/52

Outline

1 The stpm2 command

2 Why We Need Flexible Models

3 Time-Dependent Effects

4 Quantifying Differences

5 Average Survival Curve

6 Attained Age as the Time-Scale

7 Relative Survival

8 Crude Mortality

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 2/52

Page 2: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

stpm2: A brief history

Patrick Royston wrote stpm in 2001(Royston, 2001).

Chris Nelson extended the methodology in stpm to relativesurvival(Nelson et al., 2007) in strsrcs.

Time-dependent effects could be incorporated, but they tendedto be over parameterised.

I wrote stpm2 (Lambert and Royston, 2009) to

Improve the modelling of time-dependent effects.Combine the methods for standard and relative survival.Make it easier to obtain useful predictions.

stpm2 is much faster than stpm, especially with large datasets.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 3/52

How stpm2 works

In Royston-Parmar models the linear predictor is

Linear Predictor

ηi = s (ln(t)|γ, k0) + xβ

For models on the log cumulative hazard scale.

Survival and hazard functions

S(t) = exp (− exp (ηi)) h(t) =ds(ln(t)|γ, k0)

dtexp (ηi)

Feed these into the likelihood.

ln Li = di ln [h(ti)] + ln [S(ti)]

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 4/52

Page 3: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

How stpm2 works

A simplified version of the ml program is as follow,

stpm2 ml hazard.ado

program stpm2 ml hazardversion 10.0args todo b lnf g negH g1 g2

tempvar xb dxbmleval ‘xb’ = ‘b’, eq(1)mleval ‘dxb’ = ‘b’, eq(2)

local st exp(-exp(‘xb’))local ht ‘dxb’*exp(‘xb’)

mlsum ‘lnf’ = _d*ln(‘ht’) + ln(‘st’)/** then deal with late entry, first and ****** second derivatives etc **/

endPaul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 5/52

Run Rotterdam Example

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 6/52

Page 4: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

England & Wales Breast Cancer Data

Women diagnosed with breast cancer in England and Wales1986-1990 with follow-up to 1995(Coleman et al., 1999).

As an example I will investigate the effect of deprivation (in fivegroups) on all-cause mortality in women who were diagnosedunder the age of 50 years.

Follow-up will be restricted to 5 years.

Due to their age, most of the women who die within 5 years willdie due to their cancer.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 7/52

Kaplan-Meier Graphs for Breast Cancer Data

0.6

0.7

0.8

0.9

1.0

Sur

viva

l Pro

port

ion

0 1 2 3 4 5Years from Diagnosis

Least Deprived234Most Deprived

Deprivation Group

Kaplan−Meier Survival Estimates

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 8/52

Page 5: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Why We Need Flexible Models

0.04

0.05

0.06

0.07

0.080.09

Mor

talit

y R

ate

0 1 2 3 4 5Years from Diagnosis

Smoothed hazard functionHazard (Gamma)Hazard (stpm2)

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 9/52

Time-Dependent Effects

The difference between two hazard rates may not beproportional.

We can choose to,1 Ignore.2 Model on a different scale.3 Fit an interaction between the covariate and time.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 10/52

Page 6: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Time-Dependent Effects

A proportional hazards model can be written

ln [Hi(t|xi)] = ηi = s (ln(t)|γ, k0) + xiβ

With D time-dependent effects we write,

ln [Hi(t|xi)] = s (ln(t)|γ, k0) +D∑

j=1

s (ln(t)|δj , kj)xij + xiβ

There is a set of spline variables for each time-dependent effect.

For any time-dependent effect there is an interaction betweenthe covariate and the spline variables.

The number of spline variables for a particular time-dependenteffect will depend on the number of knots, kj

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 11/52

stpm2 and Time-Dependent Effects

Non-proportional effects can be fitted by use of the tvc() anddftvc() options.

Non-proportional hazards models. stpm2 dep5, scale(hazard) df(5) tvc(dep5) dftvc(3)

There is no need to split the time-scale when fittingtime-dependent effects.

When time-dependence is a linear function of ln(t) andN = 50, 000, 50% censored and no ties.

stcox using tvc() - 28 minutes, 24 seconds.stpm2 using dftvc(1) - 0 minutes, 2.5 seconds.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 12/52

Page 7: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Predicted Hazard Rates

. stpm2 dep5, scale(hazard) df(5) tvc(dep5) dftvc(3)

. range temptime 0 5 200

. predict h1, hazard timevar(temptime) at(dep5 0) per(1000)

. predict h5, hazard timevar(temptime) at(dep5 1) per(1000)

40

60

80

100

120M

orta

lity

Rat

e(p

er 1

000

pers

on y

ears

)

0 1 2 3 4 5Years from Diagnosis

Least DeprivedMost Deprived

Deprivation Group

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 13/52

Predicting Hazard Ratios

. stpm2 dep5, scale(hazard) df(5) tvc(dep5) dftvc(3)

. predict hr tvc, hrnumerator(dep5 1) hrdenominator(dep5 0) ci

1.0

1.5

2.0

3.0

4.0

Mor

talit

y R

ate

Rat

io

0 1 2 3 4 5Years from Diagnosis

Most Deprived vs. Least Deprived

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 14/52

Page 8: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Quantifying Differences

A key advantage of using a parametric model over the Coxmodel is that we can transform the model parameters to expressdifferences between groups in different ways.

The hazard ratio is a relative measure and a greaterunderstanding of the impact of an exposure can be obtained byalso looking at absolute differences.

The predict command of stpm2 makes the predictions easy.

They work in a similar way as the hrnumerator() andhrdenominator() commands.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 15/52

Difference in Hazard Rates

. predict hdiff, hdiff1(dep5 1) hdiff2(dep5 0) ci

0

25

50

75

100

Diff

eren

ce in

Mor

talit

y R

ates

(per

100

0 pe

rson

yea

rs)

0 1 2 3 4 5Years from Diagnosis

Most Deprived vs. Least Deprived

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 16/52

Page 9: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Difference in Survival Proportions

. predict sdiff, sdiff1(dep5 1) sdiff2(dep5 0) ci

−0.08

−0.06

−0.04

−0.02

0.00D

iffer

ence

in S

urvi

val P

roba

bilit

y

0 1 2 3 4 5Years from Diagnosis

Most Deprived vs. Least Deprived

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 17/52

More than one time-dependent effect

As we are modelling on the log cumulative hazard scale, we areessentially modelling non-proportional cumulative hazards.

So far we have just considered one time-dependent factor.

If we have two time-dependent effects (e.g. deprivation groupand year of diagnosis) then the time-dependent hazard ratio fordeprivation group may be different at different levels of year ofdiagnosis.Modelling on the log hazard scale would not have this problem.

Two time-dependent effects. stpm2 dep5 yeardiag, scale(hazard) df(5) tvc(dep5 yeardiag) dftvc(3). predict hr_early, hrnum(dep5 1 yeardiag 1985) ///

hrdenom(dep5 0 yeardiag 1985) ///timevar(timevar) ci

. predict hr_late, hrnum(dep5 1 yeardiag 1990) ///hrdenom(dep5 0 yeardiag 1990) ///timevar(timevar) ci

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 18/52

Page 10: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Time-dependent hazard ratios for deprivation group

1

2

3

4

5

6ha

zard

rat

io

0 1 2 3 4 5Time from Diagnosis (years)

19851990

Hazard Ratio for Deprivation Group

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 19/52

Average Survival Curves

It can be useful to summarise the average survival curve.The “easy” method is at the mean of the covariates.

Sind(t) = exp(−H0(t) exp

(xβ))

Prediction for an individual who happens to have the meanvalues of each covariate.Problem with binary covariates, e.g. a person of average sex.

This is what stcurve does.A different concept is the mean survival for a population with aparticular covariate distribution.

Spop(t) =N∑

i=1

exp(−H0(t) exp

(xβ))

These are not equivalent.Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 20/52

Page 11: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Adjusted/Standardised Survival Curve

We can extend the ideas of average survival curves to obtainadjusted survival curves.

The key is to obtain the predicted mean population survivalcurves for two or more groups, while allowing the distribution ofother covariates (e.g. age) to be the same for the two groups.

The most common method is to use the covariate distribution inthe study population as a whole, but other covariatedistributions can also be used.

The basic idea is similar to the “correct group prognosticmethod”(Nieto and Coresh, 1996).

Using flexible parametric survival models we can allow fortime-dependent covariates, continuous covariates etc.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 21/52

Kaplan-Meier Curves - Renal Replacement Therapy

Unadjusted HR = 0.62 (0.41, 0.94)Age adjusted HR = 1.14 (0.73, 1.79)

Mean Age = 62.9Mean Age = 55.5

0.0

0.2

0.4

0.6

0.8

1.0

Sur

viva

l Fun

ctio

n

0 2 4 6 8Survival Time (years)

Non−AsianAsian

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 22/52

Page 12: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Predictions for Adjusted Survival Curves

The meansurv optionstpm2 asian age, df(3) scale(hazard)/* Age distribution for study population as a whole */predict meansurv pop0, meansurv at(asian 0)predict meansurv pop1, meansurv at(asian 1)

/* Age distribution for non-asians */predict meansurv pop0b if asian == 0, meansurv at(asian 0)predict meansurv pop1b if asian == 0, meansurv at(asian 1)

/* Age distribution for asians */predict meansurv pop0c if asian == 1, meansurv at(asian 0)predict meansurv pop1c if asian == 1, meansurv at(asian 1)

Survival curve calculated for each subject in the studypopulation and then averaged.

In large studies use the timevar() option.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 23/52

Adjusted Survival Curve 1

0.0

0.2

0.4

0.6

0.8

1.0

Sur

viva

l Fun

ctio

n

0 2 4 6 8Survival Time (years)

Non−AsianAsian

Age Distribution in Whole Study Population

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 24/52

Page 13: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Adjusted Survival Curve 2

0.0

0.2

0.4

0.6

0.8

1.0S

urvi

val F

unct

ion

0 2 4 6 8Survival Time (years)

Non−AsianAsian

Age Distribution in Non−Asians

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 25/52

Adjusted Survival Curve 3

0.0

0.2

0.4

0.6

0.8

1.0

Sur

viva

l Fun

ctio

n

0 2 4 6 8Survival Time (years)

Non−AsianAsian

Age distribution in Asians

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 26/52

Page 14: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Example of Attained Age as the Time-scale

Study from Sweden(Dickman et al., 2004) comparing incidenceof hip fracture of,

17,731 men diagnosed with prostate cancer treated withbilateral orchiectomy.43,230 men diagnosed with prostate cancer not treated withbilateral orchiectomy.362,354 men randomly selected from the general population.

Outcome is for femoral neck fractures.

Risk of fracture varies by age.

Age is used as the main time-scale.

Alternative way of “adjusting” for age.

Gives the age specific incidence rates.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 27/52

Estimates from a PH Model

stset using age as the time-scale. stset dateexit,fail(frac = 1) enter(datecancer) origin(datebirth) ///

id(id) scale(365.25) exit(time datebirth + 100*365.25)

. stcox noorc orc

Cox ModelIncidence rate ratio (no orchiectomy) = 1.37 (1.28 to 1.46)Incidence rate ratio (orchiectomy) = 2.10 (1.93 to 2.28)

. stpm2 noorc orc, df(5) scale(hazard)

Royston-Parmar ModelIncidence rate ratio (no orchiectomy) = 1.37 (1.28 to 1.46)Incidence rate ratio (orchiectomy) = 2.10 (1.93 to 2.28)

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 28/52

Page 15: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Proportional Hazards

.1

1

510

255075

Inci

denc

e R

ate

(per

100

0 py

’s)

40 60 80 100Age

ControlNo OrchiectomyOrchiectomy

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 29/52

Non Proportional Hazards

.1

1

510

255075

Inci

denc

e R

ate

(per

100

0 py

’s)

40 60 80 100Age

ControlNo OrchiectomyOrchiectomy

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 30/52

Page 16: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Incidence Rate Ratio

1

2

5

10

20

Inci

denc

e R

ate

Rat

io

50 60 70 80 90 100Age

horizontal lines from piecewise Poisson model

Orchiectomy vs Control

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 31/52

Incidence Rate Difference

0

10

20

30

Diff

eren

ce in

Inci

denc

e R

ates

(per

100

0 pe

rson

yea

rs)

50 60 70 80 90 100Age

Orchiectomy vs Control

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 32/52

Page 17: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Relative Survival/Excess Mortality 1

Relative Survival is used in population-based cancer studies.

Growing interest in other disease areas: HIV (Bhaskaran et al.,2008), CHD (Nelson et al., 2008).

Relative Survival is used to measure mortality associated with aparticular disease.

Avoids needing information on cause of death.

Important as cause of death may not be recorded or may beinaccurately recorded.

We use expected mortality (from routine data sources).

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 33/52

Relative Survival/Excess Mortality 1

The total mortality (hazard) rate is the sum of two components.

ObservedMortality Rate

=Expected

Mortality Rate+

ExcessMortality Rate

h(t) = h∗(t) + λ(t)

If we transform to the survival scale,

Relative Survival =Observed Survival

Expected SurvivalR(t) =

S(t)

S∗(t)

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 34/52

Page 18: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Likelihood for Relative Survival Models

Relative Survival Models

ln Li = di ln(h∗(ti) + λ(ti)) + ln(S∗(ti)) + ln(R(ti))

S∗(ti) does not depend on the model parameters and can beexcluded from the likelihood.

Merge in expected mortality rate at time of death, h∗(ti).

This is important as many of other models for relative survivalinvolve fine splitting of the time-scale and/or numericalintegration. With large datasets this can be computationallyintensive.

Relative survival models can be fitted in stpm2 by specifying thebhazard() option that gives the expected mortality rate atdeath.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 35/52

Fitting Relative Survival Models using stpm2

Analyse all 115,331 women diagnosed with breast cancer.

Compare 5 age groups.

All Cause Survival. stpm2 agegrp2-agegrp5, df(5) scale(hazard)

For relative survival models, just add the bhazard() option.

Relative Survival. stpm2 agegrp2-agegrp5, df(5) scale(hazard) bhazard(rate)

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 36/52

Page 19: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Hazard Ratios vs Excess Hazard Ratios

All Cause Survival Relative Survival(Hazard Ratio) (Excess Hazard Ratio)

< 50 - -50-59 1.12 (1.08 to 1.15) 1.05 (1.02 to 1.09)60-69 1.28 (1.25 to 1.32) 1.07 (1.04 to 1.11)70-79 1.98 (1.92 to 2.04) 1.41 (1.36 to 1.46)80+ 4.15 (4.02 to 4.28) 2.65 (2.55 to 2.75)

The excess hazard ratios come from a poor fitting model.

The effect of age is nearly always time-dependent.

The inclusion of time-dependent effects is the same as forstandard survival models.

Relative and standard survival are now analysed within the sameframework.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 37/52

Crude Mortality

Patient survival is the most important single measure of cancerpatient care (the diagnosis and treatment of cancer) and is ofconsiderable interest to clinicians, patients, researchers,politicians, health administrators, and public health professionals(Dickman and Adami, 2006).

Little attention has been paid to the fact that each of theseconsumers of survival statistics have quite different needs.

The standard approach of estimating net survival (relativesurvival or cause-specific survival) is useful for comparingpopulations but not necessarily relevant to individual patients.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 38/52

Page 20: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Interpreting Relative Survival

The cumulative relative survival ratio can be interpreted as theproportion of patients alive after t years of follow-up in thehypothetical situation where the cancer in question is the onlypossible cause of death.

Same interpretation for cause-specific survival.

None of us live in this hypothetical world.

An individual should understand their personal risk, whichincludes their risk of dying of other causes.

To calculate “real world” probabilities we need to borrow ideasfrom competing risks theory.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 39/52

Net and Crude Mortality

Net Probabilityof Death

Due to Cancer=

Probability of death due to cancerin a hypothetical world where the

cancer under study is the onlypossible cause of death

Crude Probabilityof Death

Due to Cancer=

Probability of death due to cancerin the real world where you may die

of other causes before thecancer kills you

Some people refer to the crude probability as cumulativeincidence.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 40/52

Page 21: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Life table calculation of crude mortality

Cronin and Feuer(Cronin and Feuer, 2000) showed how crudemortality due to cancer and due to other causes can becalculated from life tables.

Available in Paul Dickman’s strs command.

Calculated separately in age groups.

Time-scale split into large (yearly) time intervals.

No individual level prediction using continuous covariate.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 41/52

Crude Mortality in Relative Survival Models

Crude mortality can be estimated after fitting a relative survivalmodel.

The fitting of the relative survival model is not any different, butwe do some tricky calculations postestimation.

The flexible parametric models allow individual level covariatesto be modelled.

See Lambert et al. (2009) for details.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 42/52

Page 22: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Brief Mathematical Details

h∗(t) - Expected mortality rateλ(t) - Excess mortality rateh(t) = h∗(t) + λ(t) - All-cause mortality rateS∗(t) - Expected SurvivalR(t) - Relative SurvivalS(t) = S∗(t)λ(t) - Overall Survival

Net Prob of Death = 1− R(t) = 1− exp

(−∫ t

0

λ(u)du

)

Crude Prob of Death (cancer) =

∫ t

0

S∗(u)R(u)λ(u)du

Crude Prob of Death (other causes) =

∫ t

0

S∗(u)R(u)h∗(u)du

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 43/52

Integrating

The integration is performed numerically by splitting thetime-scale into a large number, n, of small intervals (e.g. 1000).

The predicted value of the integrand at each of the n values of tis obtained.

The crude probability of death is the sum of the these predictedvalues.

The variance is a bit trickier, as the observation-specificderivatives need to be obtained. These are calculatednumerically (Stata’s predictnl command).

The approach is similar to that used by Carstensen whencalculating survival functions from Poisson based survivalmodels(Carstensen, 2006)

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 44/52

Page 23: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Example

28,943 men diagnosed with prostate cancer aged 40-90 inEngland and Wales between 1986-1988 inclusive and followed upto 1995.

Restricted cubic splines are used to

Model the baseline excess hazard (6 knots).Model the main effect of age (4 knots).Model time-dependence of age (4 knots).

Splines, Splines, Splines. rcsgen agediag, gen(agercs) df(3) orthog. stpm2 agercs1-agercs3, scale(h) df(5) bhazard(rate) ///

tvc(agercs1-agercs3) dftvc(3)

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 45/52

The stpm2cm Command

stpm2cm is a post estimation command.

It will calculate the crude probability of death due to cancer andother causes with associated confidence intervals.

stpm2cm. stpm2cm using uk popmort, ///

mergeby( year sex region caquint age) maxt(10) ///diagage(‘agediag’) diagyear(1986) attyear( year) ///attage( age) diagsex(1) ///at(agercs1 ‘a1’ agercs2 ‘a2’ agercs3 ‘a3’) ///stub(ci‘agediag’) tgen(ci t‘agediag’) ///mergegen(region 1 caquint 1) nobs(1000) ci

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 46/52

Page 24: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Net and Crude Probability of Death

0.0

0.2

0.4

0.6

0.8

1.0N

et P

roba

bilit

y of

Dea

th d

ue to

Can

cer

0 2 4 6 8 10Years from Diagnosis

Net Probability

0.0

0.2

0.4

0.6

0.8

1.0

Cru

de P

roba

bilit

y of

Dea

th d

ue to

Can

cer

0 2 4 6 8 10Years from Diagnosis

Crude Probability

45 years 55 years 65 years75 years 85 years

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 47/52

Predictions for a 75 year old man

P(Dead − Prostate Cancer)

P(Dead − Other Causes)

P(Alive)

0.0

0.2

0.4

0.6

0.8

1.0

Pro

babi

lity

of D

eath

0 2 4 6 8 10Years from Diagnosis

Dead (Prostate Cancer) Dead (Other Causes) Alive

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 48/52

Page 25: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Predictions for a 55 year old man

0.0

0.2

0.4

0.6

0.8

1.0

Pro

babi

lity

of D

eath

0 2 4 6 8 10Years from Diagnosis

Dead (Prostate Cancer) Dead (Other Causes) Alive

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 49/52

Predictions for a 85 year old man

0.0

0.2

0.4

0.6

0.8

1.0

Pro

babi

lity

of D

eath

0 2 4 6 8 10Years from Diagnosis

Dead (Prostate Cancer) Dead (Other Causes) Alive

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 50/52

Page 26: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Further Extensions

Update to Stata 11.

Univariate and shared frailty models.

Multiple Events.

Competing Risks.

Survey options?

Cure models.

Estimation of loss in expectation of life.

Enhance ability to model multiple time-scale.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London 51/52

References I

Bhaskaran, K., Hamouda, O., Sannes, M., Boufassa, F., Johnson, A. M., Lambert, P. C., Porter, K., and Collaboration, C. A.S. C. A. D. E. (2008). Changes in the risk of death after hiv seroconversion compared with mortality in the generalpopulation. JAMA, 300(1):51–59.

Carstensen, B. (2006). Demography and epidemiology: Practical use of the lexis diagram in the computer age or: Who needsthe cox-model anyway? Technical report, Department of Biostatistics, University of Copenhagen.

Coleman, M., Babb, P., Damiecki, P., Grosclaude, P., Honjo, S., Jones, J., Knerer, G., Pitard, A., Quinn.M.J., Sloggett, A., andDe Stavola, B. (1999). Cancer survival trends in England and Wales, 1971-1995: deprivation and NHS Region. Office forNational Statistics, London.

Cronin, K. A. and Feuer, E. J. (2000). Cumulative cause-specific mortality for cancer patients in the presence of other causes: acrude analogue of relative survival. Statistics in Medicine, 19(13):1729–1740.

Dickman, P. W. and Adami, H.-O. (2006). Interpreting trends in cancer patient survival. J Intern Med, 260(2):103–117.

Dickman, P. W., Adolfsson, J., Astrm, K., and Steineck, G. (2004). Hip fractures in men with prostate cancer treated withorchiectomy. Journal of Urology, 172(6 Pt 1):2208–2212.

Lambert, P. C., Dickman, P. W., Nelson, C. P., and Royston, P. (2009). Estimating the crude probability of death due tocancer and other causes using relative survival models. Statistics in Medicine, (in press).

Lambert, P. C. and Royston, P. (2009). Further development of flexible parametric models for survival analysis. The StataJournal, 9:265–290.

Nelson, C. P., Lambert, P. C., Squire, I. B., and Jones, D. R. (2007). Flexible parametric models for relative survival, withapplication in coronary heart disease. Statistics in Medicine, 26(30):5486–5498.

Nelson, C. P., Lambert, P. C., Squire, I. B., and Jones, D. R. (2008). Relative survival: what can cardiovascular disease learnfrom cancer? European Heart Journal, 29(7):941–947.

Nieto, F. J. and Coresh, J. (1996). Adjusting survival curves for confounders: a review and a new method. Am J Epidemiol,143(10):1059–1068.

Royston, P. (2001). Flexible parametric alternatives to the Cox model, and more. The Stata Journal, 1:1–28.

Page 27: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Example of different knots for baseline hazard

0

25

50

75

100

Pre

dict

ed M

orta

lity

Rat

e (p

er 1

000

py)

0 1 2 3 4 5Time from Diagnosis (years)

1 df: AIC = 53746.92, BIC = 53788.35

2 df: AIC = 53723.60, BIC = 53771.93

3 df: AIC = 53521.06, BIC = 53576.29

4 df: AIC = 53510.33, BIC = 53572.47

5 df: AIC = 53507.78, BIC = 53576.83

6 df: AIC = 53511.59, BIC = 53587.54

7 df: AIC = 53510.06, BIC = 53592.91

8 df: AIC = 53510.78, BIC = 53600.54

9 df: AIC = 53509.62, BIC = 53606.28

10 df: AIC = 53512.35, BIC = 53615.92

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London

Effect of number of knots on hazard ratios

13579

1 1.1 1.2 1.3 1.4

Deprivation Group 2

13579

1 1.1 1.2 1.3 1.4

Deprivation Group 3

13579

1 1.1 1.2 1.3 1.4

Deprivation Group 4

13579

1 1.1 1.2 1.3 1.4

Deprivation Group 5

df fo

r S

plin

es

Hazard Ratio

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London

Page 28: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Where to place the knots?

The default knots positions tend to work fairly well.

Unless the knots are in stupid places then there is usually verylittle difference in the fitted values.

The graphs on the following page shows for 5 df (4 internalknots) the fitted hazard and survival functions with the internalknot locations randomly selected.

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London

Baseline hazard - random knots

0

25

50

75

100

Pre

dict

ed M

orta

lity

Rat

e (p

er 1

000

py)

0 1 2 3 4 5Time from Diagnosis (years)

13.7 55.8 60.5 64.3

6.1 10.9 61.8 68.4

4.5 25.5 55.5 87.1

42.4 52.2 84.1 89.8

21.1 26.5 56.4 94.8

11.8 27.7 40.8 72.2

42.2 46.1 87.2 89.4

5.8 67.6 69.9 71.5

9.8 23.2 35.3 59.5

10.2 10.9 57.7 80.7

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London

Page 29: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Baseline survival - random knots

.7

.8

.9

1

Pre

dict

ed S

urvi

val

0 1 2 3 4 5Time from Diagnosis (years)

13.7 55.8 60.5 64.3

6.1 10.9 61.8 68.4

4.5 25.5 55.5 87.1

42.4 52.2 84.1 89.8

21.1 26.5 56.4 94.8

11.8 27.7 40.8 72.2

42.2 46.1 87.2 89.4

5.8 67.6 69.9 71.5

9.8 23.2 35.3 59.5

10.2 10.9 57.7 80.7

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London

Sensitivity to the number of knots

A potential criticism of these models is the subjectivity in thenumber and the location of the knots.

A small sensitivity analysis was carried out where the followingmodels were fitted.

Model Baseline Time-dependent age No. of AIC BICdfb dft dfa Parameters

Model (a) 5 3 3 18 97250.11 97399.02Model (b) 8 5 5 39 97059.30 97381.95Model (c) 5 5 3 24 97235.68 97434.23Model (d) 3 3 3 16 97447.35 97579.72Model (e) 8 8 8 81 97105.8 97775.92

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London

Page 30: Flexible Parametric Alternatives to the Cox Model · Flexible Parametric Alternatives to the Cox ... Patrick Royston wrote stpm in ... Paul C Lambert Flexible Parametric Survival

Knot sensitivity analysis

0

.2

.4

.6

.8

1

Cru

de P

roba

bilit

y

0 2 4 6 8 10Years from Diagnosis

Age 45

0

.2

.4

.6

.8

1

Cru

de P

roba

bilit

y

0 2 4 6 8 10Years from Diagnosis

Age 55

0

.2

.4

.6

.8

1

Cru

de P

roba

bilit

y

0 2 4 6 8 10Years from Diagnosis

Age 65

0

.2

.4

.6

.8

1

Cru

de P

roba

bilit

y

0 2 4 6 8 10Years from Diagnosis

Age 75

0

.2

.4

.6

.8

1

Cru

de P

roba

bilit

y

0 2 4 6 8 10Years from Diagnosis

Age 85

Model (a) Model (b) Model (c) Model (d) Model (e)

Paul C Lambert Flexible Parametric Survival Models UK Stata User Group 2009, London