The ilc package: Iterative Lee-Carter - Aalborg...

60
The ilc package: Iterative Lee-Carter Han Lin Shang Research School of Finance, Actuarial Studies and Applied Statistics, Australian National University Presentation prepared for the useR2015 Aalborg, 1st July 2015 Acknowledgement: Zoltan Butt and Steven Haberman (Cass Business School, London) Objectives of methods and ilc package Model, estimation and forecasting Demonstration Conclusion 1 / 26

Transcript of The ilc package: Iterative Lee-Carter - Aalborg...

Page 1: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

The ilc package: Iterative Lee-Carter

Han Lin Shang

Research School of Finance, Actuarial Studies and Applied Statistics,Australian National University

Presentation prepared for the useR2015Aalborg, 1st July 2015

Acknowledgement: Zoltan Butt and Steven Haberman (Cass Business School,

London)

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

1 / 26

Page 2: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Motivating example: UK male log mortality rates

Force of mortality is

µx,t = mx,t =yx,tex,t

where yx,t and ex,t represent the number of deaths and correspondingcentral exposure for any given age group at year t. Obtain a n× p matrixto represent age and time dimensions

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

2 / 26

Page 3: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Lee-Carter model under Gaussian error

LC model is defined as

ln(mx,t) = αx + βxκt + εx,t

1 αx represents a constant age-specific pattern

2 κt measures the trend in mortality over time

3 βx measures the age-specific deviations of mortality change from theoverall trend

4 εx,t are assumed to be N(0, σ2

)random effects by age and time

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

3 / 26

Page 4: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Lee-Carter model under Gaussian error

LC model is defined as

ln(mx,t) = αx + βxκt + εx,t

1 αx represents a constant age-specific pattern

2 κt measures the trend in mortality over time

3 βx measures the age-specific deviations of mortality change from theoverall trend

4 εx,t are assumed to be N(0, σ2

)random effects by age and time

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

3 / 26

Page 5: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Lee-Carter model under Gaussian error

LC model is defined as

ln(mx,t) = αx + βxκt + εx,t

1 αx represents a constant age-specific pattern

2 κt measures the trend in mortality over time

3 βx measures the age-specific deviations of mortality change from theoverall trend

4 εx,t are assumed to be N(0, σ2

)random effects by age and time

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

3 / 26

Page 6: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Lee-Carter model under Gaussian error

LC model is defined as

ln(mx,t) = αx + βxκt + εx,t

1 αx represents a constant age-specific pattern

2 κt measures the trend in mortality over time

3 βx measures the age-specific deviations of mortality change from theoverall trend

4 εx,t are assumed to be N(0, σ2

)random effects by age and time

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

3 / 26

Page 7: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Objectives of methods

Implement an iterative regression method for analysing age-periodmortality rates via generalised Lee-Carter (LC) model

Use Generalised Linear Model (GLM) model (Renshaw and Haberman2006)

Develop and implement a stratified LC model for the measurement ofthe additive effect on the log scale of an explanatory factor (otherthan age and time)

Produce forecasts of age-specific mortality rates and life expectancy

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

4 / 26

Page 8: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Objectives of methods

Implement an iterative regression method for analysing age-periodmortality rates via generalised Lee-Carter (LC) model

Use Generalised Linear Model (GLM) model (Renshaw and Haberman2006)

Develop and implement a stratified LC model for the measurement ofthe additive effect on the log scale of an explanatory factor (otherthan age and time)

Produce forecasts of age-specific mortality rates and life expectancy

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

4 / 26

Page 9: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Objectives of methods

Implement an iterative regression method for analysing age-periodmortality rates via generalised Lee-Carter (LC) model

Use Generalised Linear Model (GLM) model (Renshaw and Haberman2006)

Develop and implement a stratified LC model for the measurement ofthe additive effect on the log scale of an explanatory factor (otherthan age and time)

Produce forecasts of age-specific mortality rates and life expectancy

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

4 / 26

Page 10: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Objectives of methods

Implement an iterative regression method for analysing age-periodmortality rates via generalised Lee-Carter (LC) model

Use Generalised Linear Model (GLM) model (Renshaw and Haberman2006)

Develop and implement a stratified LC model for the measurement ofthe additive effect on the log scale of an explanatory factor (otherthan age and time)

Produce forecasts of age-specific mortality rates and life expectancy

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

4 / 26

Page 11: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Objectives of ilc package

Extend LC model based on the Gaussian error structure to Poisson

Instead of singular value decomposition, consider a regression modelbased on Poisson likelihood maximisation

ilc package contains methods for the analysis of a class of sixlog-linear models (capturing age, period, cohort) in the GLM withPoisson errors

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

5 / 26

Page 12: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Objectives of ilc package

Extend LC model based on the Gaussian error structure to Poisson

Instead of singular value decomposition, consider a regression modelbased on Poisson likelihood maximisation

ilc package contains methods for the analysis of a class of sixlog-linear models (capturing age, period, cohort) in the GLM withPoisson errors

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

5 / 26

Page 13: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Objectives of ilc package

Extend LC model based on the Gaussian error structure to Poisson

Instead of singular value decomposition, consider a regression modelbased on Poisson likelihood maximisation

ilc package contains methods for the analysis of a class of sixlog-linear models (capturing age, period, cohort) in the GLM withPoisson errors

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

5 / 26

Page 14: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Features of the ilc package

1 To assess goodness of fit of the regression, estimation routinessupport a range of residual diagnostic plots

2 Allows preliminary data corrections, to replace missing data cells, butalso to eliminate potential outliers that might result from datainaccuracies

3 Includes two simple methods of “closing-out” produces to correct theoriginal data at very old ages before the application of the model

4 ilc package integrates with the demography and forecast packages

5 ilc package has improved inspection and graphical visualisation ofmortality data and regression output

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

6 / 26

Page 15: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Features of the ilc package

1 To assess goodness of fit of the regression, estimation routinessupport a range of residual diagnostic plots

2 Allows preliminary data corrections, to replace missing data cells, butalso to eliminate potential outliers that might result from datainaccuracies

3 Includes two simple methods of “closing-out” produces to correct theoriginal data at very old ages before the application of the model

4 ilc package integrates with the demography and forecast packages

5 ilc package has improved inspection and graphical visualisation ofmortality data and regression output

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

6 / 26

Page 16: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Features of the ilc package

1 To assess goodness of fit of the regression, estimation routinessupport a range of residual diagnostic plots

2 Allows preliminary data corrections, to replace missing data cells, butalso to eliminate potential outliers that might result from datainaccuracies

3 Includes two simple methods of “closing-out” produces to correct theoriginal data at very old ages before the application of the model

4 ilc package integrates with the demography and forecast packages

5 ilc package has improved inspection and graphical visualisation ofmortality data and regression output

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

6 / 26

Page 17: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Features of the ilc package

1 To assess goodness of fit of the regression, estimation routinessupport a range of residual diagnostic plots

2 Allows preliminary data corrections, to replace missing data cells, butalso to eliminate potential outliers that might result from datainaccuracies

3 Includes two simple methods of “closing-out” produces to correct theoriginal data at very old ages before the application of the model

4 ilc package integrates with the demography and forecast packages

5 ilc package has improved inspection and graphical visualisation ofmortality data and regression output

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

6 / 26

Page 18: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Features of the ilc package

1 To assess goodness of fit of the regression, estimation routinessupport a range of residual diagnostic plots

2 Allows preliminary data corrections, to replace missing data cells, butalso to eliminate potential outliers that might result from datainaccuracies

3 Includes two simple methods of “closing-out” produces to correct theoriginal data at very old ages before the application of the model

4 ilc package integrates with the demography and forecast packages

5 ilc package has improved inspection and graphical visualisation ofmortality data and regression output

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

6 / 26

Page 19: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Lee-Carter model under Poisson error

1 LC parameters can be estimated by maximum likelihood methodsbased on Poisson error distribution

2 Assuming that age- and period-specific number of deaths areindependent realisations from a Poisson distribution with parameters

E[Yx,t] = ex,tµx,t, Var[Yx,t] = φE[Yx,t]

where φ is a measure of over-dispersion to allow for heterogeneity

3 GLM model of the response variable Yx,t with log-link and non-linearparameterized predictor:

ηx,t = ln(yx,t) = ln(ex,t)︸ ︷︷ ︸offset

+αx + βxκt

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

7 / 26

Page 20: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Lee-Carter model under Poisson error

1 LC parameters can be estimated by maximum likelihood methodsbased on Poisson error distribution

2 Assuming that age- and period-specific number of deaths areindependent realisations from a Poisson distribution with parameters

E[Yx,t] = ex,tµx,t, Var[Yx,t] = φE[Yx,t]

where φ is a measure of over-dispersion to allow for heterogeneity

3 GLM model of the response variable Yx,t with log-link and non-linearparameterized predictor:

ηx,t = ln(yx,t) = ln(ex,t)︸ ︷︷ ︸offset

+αx + βxκt

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

7 / 26

Page 21: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Lee-Carter model under Poisson error

1 LC parameters can be estimated by maximum likelihood methodsbased on Poisson error distribution

2 Assuming that age- and period-specific number of deaths areindependent realisations from a Poisson distribution with parameters

E[Yx,t] = ex,tµx,t, Var[Yx,t] = φE[Yx,t]

where φ is a measure of over-dispersion to allow for heterogeneity

3 GLM model of the response variable Yx,t with log-link and non-linearparameterized predictor:

ηx,t = ln(yx,t) = ln(ex,t)︸ ︷︷ ︸offset

+αx + βxκt

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

7 / 26

Page 22: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Estimation algorithm

1 Maximum likelihood point estimates under the GLM approach areobtained at the minimum value of the total deviation, given by

D (yx,t, yx,t) =∑x,t

dev(x, t) =∑x,t

2ωx,t

{yx,t ln

yx,tyx,t

− (yx,t − yx,t)

}(1)

where dev(x, t) are the deviance residuals that depend on a set ofprior weights ωx,t

2 Resort to an iterative Newton-Raphson method applied to thedeviance function (1) . We use the iterative procedure:

1 Set starting values βx2 Given βx, update αx and κt3 Given κt, update αx and βx4 Compute D(yx,t, yx,t)5 Repeat the updating cycle; stop when D(yx,t, yx,t) converges

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

8 / 26

Page 23: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Estimation algorithm

1 Maximum likelihood point estimates under the GLM approach areobtained at the minimum value of the total deviation, given by

D (yx,t, yx,t) =∑x,t

dev(x, t) =∑x,t

2ωx,t

{yx,t ln

yx,tyx,t

− (yx,t − yx,t)

}(1)

where dev(x, t) are the deviance residuals that depend on a set ofprior weights ωx,t

2 Resort to an iterative Newton-Raphson method applied to thedeviance function (1) . We use the iterative procedure:

1 Set starting values βx2 Given βx, update αx and κt3 Given κt, update αx and βx4 Compute D(yx,t, yx,t)5 Repeat the updating cycle; stop when D(yx,t, yx,t) converges

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

8 / 26

Page 24: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Estimation algorithm

1 Maximum likelihood point estimates under the GLM approach areobtained at the minimum value of the total deviation, given by

D (yx,t, yx,t) =∑x,t

dev(x, t) =∑x,t

2ωx,t

{yx,t ln

yx,tyx,t

− (yx,t − yx,t)

}(1)

where dev(x, t) are the deviance residuals that depend on a set ofprior weights ωx,t

2 Resort to an iterative Newton-Raphson method applied to thedeviance function (1) . We use the iterative procedure:

1 Set starting values βx

2 Given βx, update αx and κt3 Given κt, update αx and βx4 Compute D(yx,t, yx,t)5 Repeat the updating cycle; stop when D(yx,t, yx,t) converges

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

8 / 26

Page 25: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Estimation algorithm

1 Maximum likelihood point estimates under the GLM approach areobtained at the minimum value of the total deviation, given by

D (yx,t, yx,t) =∑x,t

dev(x, t) =∑x,t

2ωx,t

{yx,t ln

yx,tyx,t

− (yx,t − yx,t)

}(1)

where dev(x, t) are the deviance residuals that depend on a set ofprior weights ωx,t

2 Resort to an iterative Newton-Raphson method applied to thedeviance function (1) . We use the iterative procedure:

1 Set starting values βx2 Given βx, update αx and κt

3 Given κt, update αx and βx4 Compute D(yx,t, yx,t)5 Repeat the updating cycle; stop when D(yx,t, yx,t) converges

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

8 / 26

Page 26: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Estimation algorithm

1 Maximum likelihood point estimates under the GLM approach areobtained at the minimum value of the total deviation, given by

D (yx,t, yx,t) =∑x,t

dev(x, t) =∑x,t

2ωx,t

{yx,t ln

yx,tyx,t

− (yx,t − yx,t)

}(1)

where dev(x, t) are the deviance residuals that depend on a set ofprior weights ωx,t

2 Resort to an iterative Newton-Raphson method applied to thedeviance function (1) . We use the iterative procedure:

1 Set starting values βx2 Given βx, update αx and κt3 Given κt, update αx and βx

4 Compute D(yx,t, yx,t)5 Repeat the updating cycle; stop when D(yx,t, yx,t) converges

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

8 / 26

Page 27: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Estimation algorithm

1 Maximum likelihood point estimates under the GLM approach areobtained at the minimum value of the total deviation, given by

D (yx,t, yx,t) =∑x,t

dev(x, t) =∑x,t

2ωx,t

{yx,t ln

yx,tyx,t

− (yx,t − yx,t)

}(1)

where dev(x, t) are the deviance residuals that depend on a set ofprior weights ωx,t

2 Resort to an iterative Newton-Raphson method applied to thedeviance function (1) . We use the iterative procedure:

1 Set starting values βx2 Given βx, update αx and κt3 Given κt, update αx and βx4 Compute D(yx,t, yx,t)

5 Repeat the updating cycle; stop when D(yx,t, yx,t) converges

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

8 / 26

Page 28: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Estimation algorithm

1 Maximum likelihood point estimates under the GLM approach areobtained at the minimum value of the total deviation, given by

D (yx,t, yx,t) =∑x,t

dev(x, t) =∑x,t

2ωx,t

{yx,t ln

yx,tyx,t

− (yx,t − yx,t)

}(1)

where dev(x, t) are the deviance residuals that depend on a set ofprior weights ωx,t

2 Resort to an iterative Newton-Raphson method applied to thedeviance function (1) . We use the iterative procedure:

1 Set starting values βx2 Given βx, update αx and κt3 Given κt, update αx and βx4 Compute D(yx,t, yx,t)5 Repeat the updating cycle; stop when D(yx,t, yx,t) converges

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

8 / 26

Page 29: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Inclusion of cohort effect

1 Basic LC model can be extended to include an additional bilinearterm, containing a second period effect or a cohort effect

2 Force of mortality by a generalised structure is given as

µx,t = exp(αx + β(0)x lt−x + β(1)x κt

)where αx: main age profile; lt−x: cohort effect; κt: period

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

9 / 26

Page 30: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Inclusion of cohort effect

1 Basic LC model can be extended to include an additional bilinearterm, containing a second period effect or a cohort effect

2 Force of mortality by a generalised structure is given as

µx,t = exp(αx + β(0)x lt−x + β(1)x κt

)where αx: main age profile; lt−x: cohort effect; κt: period

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

9 / 26

Page 31: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Lee-Carter model with additional covariates

1 Additional factor depends on the size and nature of the mortalityexperience, such as geographical, socio-economic or race differences

2 Consider a cross-classified mortality experience observed over age x,period t and an extra variate g made up of (k × n× l) data cells

3 Stratified LC model is given by

ηx,t,g = ln(yx,t,g) = ln(ex,t,g)︸ ︷︷ ︸offset

+αx + αg + βxκt,

where αg measures the relative differences between the age-specificlog mortality profiles among subgroups defined by the extra variate g

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

10 / 26

Page 32: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Lee-Carter model with additional covariates

1 Additional factor depends on the size and nature of the mortalityexperience, such as geographical, socio-economic or race differences

2 Consider a cross-classified mortality experience observed over age x,period t and an extra variate g made up of (k × n× l) data cells

3 Stratified LC model is given by

ηx,t,g = ln(yx,t,g) = ln(ex,t,g)︸ ︷︷ ︸offset

+αx + αg + βxκt,

where αg measures the relative differences between the age-specificlog mortality profiles among subgroups defined by the extra variate g

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

10 / 26

Page 33: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Lee-Carter model with additional covariates

1 Additional factor depends on the size and nature of the mortalityexperience, such as geographical, socio-economic or race differences

2 Consider a cross-classified mortality experience observed over age x,period t and an extra variate g made up of (k × n× l) data cells

3 Stratified LC model is given by

ηx,t,g = ln(yx,t,g) = ln(ex,t,g)︸ ︷︷ ︸offset

+αx + αg + βxκt,

where αg measures the relative differences between the age-specificlog mortality profiles among subgroups defined by the extra variate g

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

10 / 26

Page 34: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Forecasting

1 Forecasting mortality in the LC family of models is based on timeseries prediction of the calendar time dependent parameters (lt−x, κt)

2 Mortality rate forecasts can be written as

µx,n+h = exp(αx + β(0)x ln+h−x + β(1)x κn+h

)where ln+h−x and κn+h represent the forecast cohort and periodeffects

3 Random walk with drift, ARIMA(0,1,0), is used to forecast periodeffect (κt), expressed as

κt = κt−1 + d+ et

where d measures the drift and et represents the white noise

4 In the cohort effects, forecasts revert to the fitted parameters when hfalls within the available data range

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

11 / 26

Page 35: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Forecasting

1 Forecasting mortality in the LC family of models is based on timeseries prediction of the calendar time dependent parameters (lt−x, κt)

2 Mortality rate forecasts can be written as

µx,n+h = exp(αx + β(0)x ln+h−x + β(1)x κn+h

)where ln+h−x and κn+h represent the forecast cohort and periodeffects

3 Random walk with drift, ARIMA(0,1,0), is used to forecast periodeffect (κt), expressed as

κt = κt−1 + d+ et

where d measures the drift and et represents the white noise

4 In the cohort effects, forecasts revert to the fitted parameters when hfalls within the available data range

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

11 / 26

Page 36: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Forecasting

1 Forecasting mortality in the LC family of models is based on timeseries prediction of the calendar time dependent parameters (lt−x, κt)

2 Mortality rate forecasts can be written as

µx,n+h = exp(αx + β(0)x ln+h−x + β(1)x κn+h

)where ln+h−x and κn+h represent the forecast cohort and periodeffects

3 Random walk with drift, ARIMA(0,1,0), is used to forecast periodeffect (κt), expressed as

κt = κt−1 + d+ et

where d measures the drift and et represents the white noise

4 In the cohort effects, forecasts revert to the fitted parameters when hfalls within the available data range

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

11 / 26

Page 37: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Forecasting

1 Forecasting mortality in the LC family of models is based on timeseries prediction of the calendar time dependent parameters (lt−x, κt)

2 Mortality rate forecasts can be written as

µx,n+h = exp(αx + β(0)x ln+h−x + β(1)x κn+h

)where ln+h−x and κn+h represent the forecast cohort and periodeffects

3 Random walk with drift, ARIMA(0,1,0), is used to forecast periodeffect (κt), expressed as

κt = κt−1 + d+ et

where d measures the drift and et represents the white noise

4 In the cohort effects, forecasts revert to the fitted parameters when hfalls within the available data range

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

11 / 26

Page 38: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

CMI data

1 CMI data contains the mortality experience of male life officepensioners retiring at or after normal retirement age

2 Data is made up of observed central exposure and deaths for ages50-108 from 1983 to 2003

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

12 / 26

Page 39: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

CMI data

1 CMI data contains the mortality experience of male life officepensioners retiring at or after normal retirement age

2 Data is made up of observed central exposure and deaths for ages50-108 from 1983 to 2003

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

12 / 26

Page 40: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

R demo of explanatory plots

1 Plot mortality rates, population-at-risk, death counts for any agegroup and year

>insp.dd(dd.cmi.pens,age=50:80,year=1985:1990)

>insp.dd(dd.cmi.pens,what=‘pop’,age=70:100,year=1988:1993)

>insp.dd(dd.cmi.pens,what=‘deaths’,age=seq(100),

year=1980:2010)

2 Produce simple plots (i.e., without legend) of log- or untransformedrates:

>plot(dd.cmi.pens)

>plot(dd.cmi.pens,transform=FALSE)

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

13 / 26

Page 41: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

R demo of explanatory plots

1 Plot mortality rates, population-at-risk, death counts for any agegroup and year

>insp.dd(dd.cmi.pens,age=50:80,year=1985:1990)

>insp.dd(dd.cmi.pens,what=‘pop’,age=70:100,year=1988:1993)

>insp.dd(dd.cmi.pens,what=‘deaths’,age=seq(100),

year=1980:2010)

2 Produce simple plots (i.e., without legend) of log- or untransformedrates:

>plot(dd.cmi.pens)

>plot(dd.cmi.pens,transform=FALSE)

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

13 / 26

Page 42: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

R demo of explanatory plots

1 Produce annotated plots of log or original rates:

>plot_dd(dd.cmi.pens, xlim=c(40, 110),

lpar = list(x.int = -0.2, y.int = 0.9, cex = 0.85))

>plot_dd(dd.cmi.pens, year=1985:1995, transform=FALSE)

>plot_dd(dd.cmi.pens, year=1995:1997, transform=FALSE,

lty=1:3, col=1:3)

2 Deal with missing data

# without correction of empty cells

>tmp.d = extract.deaths(dd.cmi.pens, ages=55:100)

# empty cells are filled using perk model

>tmp.d = extract.deaths(dd.cmi.pens, ages=55:100,

fill=‘perks’)

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

14 / 26

Page 43: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

R demo of explanatory plots

1 Produce annotated plots of log or original rates:

>plot_dd(dd.cmi.pens, xlim=c(40, 110),

lpar = list(x.int = -0.2, y.int = 0.9, cex = 0.85))

>plot_dd(dd.cmi.pens, year=1985:1995, transform=FALSE)

>plot_dd(dd.cmi.pens, year=1995:1997, transform=FALSE,

lty=1:3, col=1:3)

2 Deal with missing data

# without correction of empty cells

>tmp.d = extract.deaths(dd.cmi.pens, ages=55:100)

# empty cells are filled using perk model

>tmp.d = extract.deaths(dd.cmi.pens, ages=55:100,

fill=‘perks’)

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

14 / 26

Page 44: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Explanatory plots: dealing with missing values

50 60 70 80 90 100 110

−6

−4

−2

0

CMI: male death rates (1983−2003)

Age

Log

deat

h ra

te

40 50 60 70 80 90 100 110

−6

−4

−2

0

CMI: male death rates (1983−2003)

AgeLo

g de

ath

rate

Year198319841985198619871988198919901991199219931994199519961997199819992000200120022003

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

15 / 26

Page 45: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

R demo for estimation of LC model

Estimate the base LC model with Poisson errors

>mod6 = lca.rh(dd.cmi.pens, mod = ‘lc’, interpolate=TRUE)

>coef(mod6); plot(mod6)

>fitted_plot(mod6); residual_plot(mod6)

50 60 70 80 90 100

−5

−3

Age

α x

Main effects

50 60 70 80 90 100

0.00

0.06

Age

β x(1)

Interaction effects

Calendar year

κ t (p

oiss

on)

1985 1990 1995 2000

−15

−5

5

Period effects

Standard LC Regression for CMI [male]

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

16 / 26

Page 46: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Plots of fitted models

>forc6 = forecast(mod6, h = 20, jump = ‘fit’, level = 90,

shift=FALSE)

>plot_dd(forc6, xlim=c(45,100), lpar=list(x.int=-0.2,

y.int=0.9, cex=0.95))

>le6 = life.expectancy(forc6, age=60)

>flc.plot(mod6, at=60, h=30, level=90)

Forecasts from Random walk with drift

Year

κ t (p

oiss

on)

1990 2000 2010 2020 2030

−80

−60

−40

−20

020

CMI : male

Year

le60

1990 2000 2010 2020 2030

2025

3035

4045

ObsFitFcast

Forecasts of Life Expectancy at age 60CMI : male

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

17 / 26

Page 47: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

R demo for estimation of age-period-cohort model

>mod1 = lca.rh(dd.cmi.pens, age=60:95, mod = "m",

restype=‘deviance’, dec.conv=3)

>coef(mod1)

>plot(mod1)

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

18 / 26

Page 48: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Age-period-cohort plot

60 70 80 90−4.

5−

3.5

−2.

5−

1.5

Age

α xMain age effects

60 70 80 90

0.02

00.

035

0.05

0

Age

β x(1)

Period Interaction effects

60 70 80 90

−0.

040.

000.

04

Age

β x(0)

Cohort Interaction effects

Calendar year

κ t (p

oiss

on)

1985 1990 1995 2000

−15

−10

−5

0

Period effects

Year of birth

ι t−x (p

oiss

on)

1890 1900 1910 1920 1930 1940

−4

02

46

8

Cohort effects

Age−Period−Cohort LC Regression for CMI [male]

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

19 / 26

Page 49: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

R demo for stratified LC model

1 For stratified LC model, ilc package introduces a special class of dataobject that holds information about the grouping factors andaggregate data of number of deaths, central exposures and mortalityrates

2 Taking the CMI experience as the base data, produce a randomlystratified mortality data

>rfp.cmi = dd.rfp(dd.cmi.pens, rfp = c(0.5,1.2,-0.7,2.5))

>matplot(rfp.cmi$age, rfp.cmi$pop[,,1], type=‘l’,

xlab=‘Age’, ylab=‘Ec’, main = ‘Base Level’)

>matplot(rfp.cmi$age, rfp.cmi$pop[,,2], type=‘l’,

xlab=‘Age’, ylab=‘Ec’, main = ‘Base Level’)

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

20 / 26

Page 50: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

R demo for stratified LC model

1 For stratified LC model, ilc package introduces a special class of dataobject that holds information about the grouping factors andaggregate data of number of deaths, central exposures and mortalityrates

2 Taking the CMI experience as the base data, produce a randomlystratified mortality data

>rfp.cmi = dd.rfp(dd.cmi.pens, rfp = c(0.5,1.2,-0.7,2.5))

>matplot(rfp.cmi$age, rfp.cmi$pop[,,1], type=‘l’,

xlab=‘Age’, ylab=‘Ec’, main = ‘Base Level’)

>matplot(rfp.cmi$age, rfp.cmi$pop[,,2], type=‘l’,

xlab=‘Age’, ylab=‘Ec’, main = ‘Base Level’)

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

20 / 26

Page 51: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Plots of stratified Lee-Carter

50 70 90 110

050

0015

000

2500

0

Base Level

Age

Ec

50 70 90 110

050

0015

000

2500

0

Level a

Age

Ec

50 70 90 110

050

0015

000

2500

0

Level b

Age

Ec

50 70 90 110

050

0015

000

2500

0

Level c

Age

Ec

50 70 90 110

050

0015

000

2500

0

Level d

Age

Ec

50 70 90 110

−6

−4

−2

0

Base Level

Age

log(

mu)

50 70 90 110

−6

−4

−2

0

Level a

Age

log(

mu)

50 70 90 110

−4

−2

02

Level b

Age

log(

mu)

50 70 90 110

−6

−5

−4

−3

−2

−1

0

Level c

Agelo

g(m

u)

50 70 90 110

−4

−2

02

Level d

Age

log(

mu)

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

21 / 26

Page 52: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

R demo for estimating and forecasting of stratified LCmodel

>rfp.cmi = dd.rfp(dd.cmi.pens, rfp = c(0.5, 1.2, -0.7, 2.5))

>mod6e = elca.rh(rfp.cmi, age=50:100, interpolate=TRUE,

dec.conv=3, verbose=TRUE)

>coef(mod6e)

>mod6ef = forecast.lca(mod6e, h = 20, level = 90, jump=‘fit’,

shift=FALSE)

>plot(mod6ef$kt, ylab=‘kt’, xlab=‘Year’)

>matfle.plot(mod6e$lca, mod6, at=60, label=‘RFP CMI’, h=20)

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

22 / 26

Page 53: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Plot of forecast life expectancy

Forecasts from Random walk with drift

Year

kt

1990 2000 2010 2020

−60

−40

−20

020

1985 1995 2005 2015 20255

1015

2025

3035

Year

le60

+++++++++

+++++

+++++++

++++++

++++++

++++++

++

d

base

a

b

c

+ dbaseabc

Forecasts of Life Expectancy at age 60

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

23 / 26

Page 54: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Conclusion

1 ilc package implements the Lee-Carter model with Gaussian andPoisson errors

2 ilc package implements additional five models discussed in Renshawand Haberman (2006)

3 Stratified Lee-Carter model allows users to include additionalcovariates (other than age and time)

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

24 / 26

Page 55: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Conclusion

1 ilc package implements the Lee-Carter model with Gaussian andPoisson errors

2 ilc package implements additional five models discussed in Renshawand Haberman (2006)

3 Stratified Lee-Carter model allows users to include additionalcovariates (other than age and time)

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

24 / 26

Page 56: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Conclusion

1 ilc package implements the Lee-Carter model with Gaussian andPoisson errors

2 ilc package implements additional five models discussed in Renshawand Haberman (2006)

3 Stratified Lee-Carter model allows users to include additionalcovariates (other than age and time)

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

24 / 26

Page 57: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

References

Renshaw, A. E., and S. Haberman, 2003. Lee-Carter mortalityforecasting with age-specific enhancement. Insurance: Mathematicsand Economics, 33, 255-272.

Hyndman, R. J., and H. L. Shang, 2010. Rainbow plots, bagplots andboxplot for functional data, Journal of Computational and GraphicalStatistics, 19(1), 29-45.

H. L. Shang, 2011. rainbow: An R package for visualizing functionaltime series, The R Journal, 3(2), 54-59.

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

25 / 26

Page 58: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

References

Renshaw, A. E., and S. Haberman, 2003. Lee-Carter mortalityforecasting with age-specific enhancement. Insurance: Mathematicsand Economics, 33, 255-272.

Hyndman, R. J., and H. L. Shang, 2010. Rainbow plots, bagplots andboxplot for functional data, Journal of Computational and GraphicalStatistics, 19(1), 29-45.

H. L. Shang, 2011. rainbow: An R package for visualizing functionaltime series, The R Journal, 3(2), 54-59.

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

25 / 26

Page 59: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

References

Renshaw, A. E., and S. Haberman, 2003. Lee-Carter mortalityforecasting with age-specific enhancement. Insurance: Mathematicsand Economics, 33, 255-272.

Hyndman, R. J., and H. L. Shang, 2010. Rainbow plots, bagplots andboxplot for functional data, Journal of Computational and GraphicalStatistics, 19(1), 29-45.

H. L. Shang, 2011. rainbow: An R package for visualizing functionaltime series, The R Journal, 3(2), 54-59.

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

25 / 26

Page 60: The ilc package: Iterative Lee-Carter - Aalborg Universitetuser2015.math.aau.dk/presentations/89.pdf · mortality rates via generalised Lee-Carter (LC) model Use Generalised Linear

Thank you! · Tak

Objectives of methods and ilc packageModel, estimation and forecasting

DemonstrationConclusion

26 / 26