a history of mortality modelling from gompertz to lee

24
A History of Mortality Modelling from Gompertz to Lee-Carter Everything in a single R package: MortalityLaws Marius Pascariu and Vladimir Canudas-Romo Max-Planck Odense Center on the Biodemography of Aging University of Southern Denmark 8th Demographic Conference of "Young Demographers" Prague, Czech Republic February 16, 2017 Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 1 / 24

Upload: others

Post on 08-May-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A History of Mortality Modelling from Gompertz to Lee

A History of Mortality Modellingfrom Gompertz to Lee-Carter

Everything in a single R package: MortalityLaws

Marius Pascariu and Vladimir Canudas-Romo

Max-Planck Odense Center on the Biodemography of AgingUniversity of Southern Denmark

8th Demographic Conference of "Young Demographers"

Prague, Czech Republic

February 16, 2017

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 1 / 24

Page 2: A History of Mortality Modelling from Gompertz to Lee

Agenda

Development of mortality modelling

Motivation

MortalityLaws R package

Discussion

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 2 / 24

Page 3: A History of Mortality Modelling from Gompertz to Lee

What is Modelling?

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 3 / 24

Page 4: A History of Mortality Modelling from Gompertz to Lee

What is Modelling?

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 4 / 24

Page 5: A History of Mortality Modelling from Gompertz to Lee

Mortality Modelling Timeline

DeMoivre

Gompertz

Makeham

Opperman

Thiele

Wittstein & Bumstead

Steffenson

Perks

Harper

Weibull

Van der Maen

Brillinger

Beard

Siler

Heligman−Pollard

Brooks et al.

Petrioli

Hartmann

Mode and Busby

Rogers and Planck

Martinelle

Kostaki

Carriere

Kannisto

Lee−Carter

Rogers and Little

1725 1750 1775 1800 1825 1850 1875 1900 1925 1950 1975 2000

YEAR

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 5 / 24

Page 6: A History of Mortality Modelling from Gompertz to Lee

Age Pattern of Human Mortality

Female population in Czech Republic, 1970

Infant mortalityAccidental humpAdult mortalityOld-age mortality

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 6 / 24

Page 7: A History of Mortality Modelling from Gompertz to Lee

Age Pattern of Human Mortality

Female population in Czech Republic, 1970

WeibullOppermanInverse-GompertzGompertzMakehamKannistoQuadratic—————-ThieleWittsteinHeligman-PollardCarriere...

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 7 / 24

Page 8: A History of Mortality Modelling from Gompertz to Lee

Mortality Modelling & Forecasting in R

Demography (Hyndman 2014)Lee-Carter model and several of its variants

ilc (Butt, Haberman, and Shang 2014)Lee-Carter with cohorts and Lee-Carter under a Poisson framework

LifemetricsCBD and extensionsLee-Carter with cohorts and Lee-Carter under a Poisson framework

StMoMo Stochastic Mortality Modelling

ActuDistns Computes the probability density function for 44commonly used survival models

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 8 / 24

Page 9: A History of Mortality Modelling from Gompertz to Lee

MortalityLaws: An R package for fitting human mortality

1 Smoothing data

2 Eliminating or/and reducing errors

3 Construct life tables

4 Facilitate comparisons of mortality improvement

5 Forecasting

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 9 / 24

Page 10: A History of Mortality Modelling from Gompertz to Lee

MortalityLaws: An R package for fitting human mortality

REPOSITORY

Development version on Github:

https://github.com/mpascariu/MortalityLaws

INSTALLATIONMake sure you have the most recent version of R and

# install.packages(‘‘devtools’’)

library(devtools)

install github(‘‘mpascariu/MortalityLaws’’)

HELPAll functions are documented in the standard way, which means that onceyou load the package using library(MortalityLaws) you can just type?MortalityLaw to see the help file.

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 10 / 24

Page 11: A History of Mortality Modelling from Gompertz to Lee

Mortality models already implemented in the package

Mortality laws Year Predictor

DeMoivre 1725 1(ω−x)

Gompertz 1825 aebx or 1σexp{

x−mσ

}Inverse-Gompertz 1

σexp{

x−mσ

}/

(exp

{e−(x−m)σ

}− 1

)

Makeham 1860 aebx + c

Inverse-Makeham 1σexp{

x−mσ

}/

(exp

{e−(x−m)σ

}− 1

)+ c

Opperman 1870 a√x+ b + c

√x

Thiele 1872 a1e−b1x + a2e

− 12b2(x−c)2

+ a3eb3x

Wittstein & Bumstead 1883 1ma−(mx)n + a−(M−x)n

Weibull 1939 1σ

(xm

)mσ−1

Inverse-Weibull 1σ

(xm

)−mσ−1/

(exp

{(xm

)−mσ

}− 1

)Siler 1979 a1e

−b1t + a2 + a3eb3t

Heligman - Pollard 1980 A(x+B)C + De−E(lnx −lnF )2 + GHx

Kannisto 1992 aebx

1+aebx+ c

Carriere 1992 s (x) = ψ1s1 (x) + ψ2s2 (x) + ψ3s3 (x)

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 11 / 24

Page 12: A History of Mortality Modelling from Gompertz to Lee

Objective or loss functions

Find parameter estimates by minimizing any of the functions below:

Name Function

Poisson Log-Likelihood −∑

x {Dx logµ̂x − E cx µ̂x}+ c

Binomial Log-Likelihood −∑

x

{Dx log

[1− e−µ̂x

]− [E c

x − Dx ] µ̂x

}+ c

Loss Function 1 (LF1)(1− µ̂x

µx

)2LF2 log

(µ̂xµx

) 2

LF3 (µx−µ̂x )2

µx

LF4 (µx − µ̂x )2

LF5 (µx − µ̂x ) log(µxµ̂x

)LF6 |µx − µ̂x |

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 12 / 24

Page 13: A History of Mortality Modelling from Gompertz to Lee

Model fitting using different objective functions

Heligman-Pollard applied to E&W 2010

mx = A(x+B)C + De−E(lnx −lnF )2 + GHx

●●●

●●●●

●●●●

●●●●●●●

●●

●●●●●●

●●

●●●●

●●●●

●●●●●●●●●●●

●●●

●●●●●●●●●

●●●●●●

●●●●●●●

●●

●●●

●●

●●●●●

●●●●

●●●●●●●●

Age (x)

Log

Dea

th R

ate,

log(

mx)

0 20 40 60 80 1005e−

055e

−04

5e−

035e

−02

5e−

01

poissonLbinomialLLF1LF2LF5

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 13 / 24

Page 14: A History of Mortality Modelling from Gompertz to Lee

1 The golden-section search - find the optimum by successivelynarrowing the range of values inside a interval. In R in stats Rpackage optimize function. Kiefer (1953)

2 Nelder-Mead method - approximates a local optimum of a problemwith n variables when the objective function varies smoothly and isunimodal. Implemented in stats R package, called in optim function.Nelder & Mead (1965)

3 PORT routines - provides unconstrained optimization andoptimization subject to box constraints for complicated functions. Seenlminb function, stats package.

4 Levenberg-Marquardt algorithm - damped least-squares method.Check nls.lm function in minpack.lm. Levenberg(1944);Marquardt(1963).

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 14 / 24

Page 15: A History of Mortality Modelling from Gompertz to Lee

Model fitting: Data

Download data from HMD using ReadHMD(...) function

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 15 / 24

Page 16: A History of Mortality Modelling from Gompertz to Lee

Model fitting: Data

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 16 / 24

Page 17: A History of Mortality Modelling from Gompertz to Lee

Example: Siler Model - Czech Republic, 2012

Siler (1979): mx = a1e−b1t + a2 + a3e

b3t

Fit the model using: MortalityLaw(...)

Check output object: ls(fit.siler)

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 17 / 24

Page 18: A History of Mortality Modelling from Gompertz to Lee

Example: Siler Model - Czech Republic, 2012

Summary : summary(fit.siler)

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 18 / 24

Page 19: A History of Mortality Modelling from Gompertz to Lee

Example: Siler Model - Czech Republic, 2012

Generic plot function : plot(fit.siler)

●●

●●●

●●●

●●●●●

●●●●●●●

●●●●●●●●

●●●●●●●●●●

●●●●●●●●

●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●

●●●●●

Observed and Fitted Age−Specific Death Rate

Age (x)

log(

mx)

0 25 50 75 100

−9.

9−

8.2

−6.

1−

3.6

−0.

7

● ObservedFitted

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●

●●

●●●

●●

●●

●●

Residual plot

Age (x)

Err

or

0 25 50 75 100

−0.

10−

0.05

0.00

Frequency0 20 40

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 19 / 24

Page 20: A History of Mortality Modelling from Gompertz to Lee

Example: Siler Model - Czech Republic, 2012

Generic plot function : plot(fit.siler)

●●

●●●

●●●

●●●●●

●●●●●●●

●●●●●●●●

●●●●●●●●●●

●●●●●●●●

●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●

●●●●●

Observed and Fitted Age−Specific Death Rate

Age (x)

log(

mx)

0 25 50 75 100

−9.

9−

8.2

−6.

1−

3.6

−0.

7

● ObservedFitted

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●

●●

●●●

●●

●●

●●

Residual plot

Age (x)

Err

or

0 25 50 75 100

−0.

10−

0.05

0.00

Frequency0 20 40

We have a problem!!!

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 20 / 24

Page 21: A History of Mortality Modelling from Gompertz to Lee

Example: Siler Model - Czech Republic, 2012

Model fitted on the 0-75 age-range

●●

●●●

●●●

●●●●●

●●●●●●●

●●●●●●●●

●●●●●●●●●●

●●●●●●●●

●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●

●●●●●

Observed and Fitted Age−Specific Death Rate

Age (x)

log(

mx)

0 25 50 75 100

−9.

9−

8.2

−6.

1−

3.6

−0.

7

● ObservedFitted

●●●●●●●●●●

●●●●●

●●●●

●●●

●●●

●●

●●●

●●●●●●

●●●

●●

●●

●●

●●

●●

●●

●●

Residual plot

Age (x)

Err

or

0 18 37 56 75

−5e

−04

0e+

005e

−04

1e−

03

Frequency0 10 25

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 21 / 24

Page 22: A History of Mortality Modelling from Gompertz to Lee

More mortality laws

Observed and fitted death rates between age 0 and 100 for female population inEngland & Wales

●●●●●●●●●●●●

●●●●●●●

●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●

●●●●●●●●

●●●●●●●●

●●●●●●●●

●●●●●●●

●●●●●●

●●●●●●

●●●●

●●●●●●●●●●●●●

●●●●●●●

●●●●●●●●●

●●●●●●●●●

●●●●●●●●●

●●●●●●●●●

●●●●●●●●●●

●●●●●●

●●●●●●

●●●●●●●●

●●●●●●●●

●●●●●

●●●●●●●●●●

●●●

●●●●●●●●●●

●●●●●●●●●●

●●●●●●●●

●●●●●

●●●●●●●●●

●●●●●

●●●●●

●●●●●

●●●●●●●●●

●●●●●

●●●●●●

●●●●●●●●

●●●●●

●●●●●●●●●●●

●●●●●●●●

●●●●●●●●

●●●●●●●●●●

●●●●●●

●●●●●

●●●●●

●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●

1850 1900 1950 2013

−10.0

−7.5

−5.0

−2.5

0.0

0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100

Age (x)

Age

Spe

cific

−D

eath

Rat

e, m

x

Mortality Laws: Heligman−Pollard (1980) Thiele (1871) Wittstein (1883)

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 22 / 24

Page 23: A History of Mortality Modelling from Gompertz to Lee

Old-age mortality

Observed and fitted old-age mortality for female population in England & Wales

●●●●●●●●●●●●●●●●

●●

●●

●●

●●

●●

●●

Fitted age−range

●●●●●●●●

●●●●●●●●

●●●●

●●

●●

●●

●Fitted age−range

●●●●●●●●●●●

●●●●

●●●●

●●●

●●

●●

Fitted age−range

●●●●●●●●●●●●●●●●●●

●●●

●●●

●●

●●

●●

●●●

●●

Fitted age−range

1850 1900 1950 2013

0.00

0.25

0.50

0.75

1.00

80 90 100 110 120 80 90 100 110 120 80 90 100 110 120 80 90 100 110 120

Age (x)

Age

Spe

cific

−D

eath

Rat

e, m

x

Mortality Laws: Gompertz (1825) Kannisto (1992) Makeham (1867)

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 23 / 24

Page 24: A History of Mortality Modelling from Gompertz to Lee

Download and install R package:

https://github.com/mpascariu/MortalityLaws

-

-

Contact details:

[email protected]

Pascariu & Canudas-Romo (MaxO) MortalityLaws February 16, 2017 24 / 24