**Freakonometrics - Tag - R-english**, and kindly contributed to R-bloggers)

I received recently a comment by FCA (here) who raised an important question, about forecast in dynamic mortality models. (S)he mentioned that from his(her) point of view, the econometric models I considered were “good to predict for the next, say, 3 or 4 years. Not for the next 50

years…“. Which was the message I tried to stress last year in a conference about retirement in France (here). But from a *quantitative* point of view, how inconsistent were forecasts made 35 years ago, or 60 years ago ?

Consider here the Lee Carter model, obtained on the periods 1816-1950 (in black below), 1816-1975 (in red) and 1816-2000 (in blue), unfortunately, it is difficult to compare ‘s since we have identifiability problems here. Nevertheless, we if consider affine transformation so that ‘s are equal in 1900 and 1950 (say), we obtain

On that graph, we considered an ETS (AAN) forecast. If we do not consider the entire series for forecasting, but only observations following WWI (1945), we obtain

For sketches of the R code,

T=1980

base0=data.frame(D,E,A,Y,a=as.factor(A),

y=as.factor(Y))

base=base0[base0$Y<=T,]

LC2=gnm(D~a+Mult(a,y),offset=log(E),family=

poisson,data=base)

A=LC2$coefficients[1]+LC2$coefficients[2:110]

B=LC2$coefficients[111:220]

K0=LC2$coefficients[221:length(LC2$coefficients)]

Y=as.numeric(K0)

K1=c(K0,forecast(ets(Y,model="AAN"),h=240)$mean)

K2=c(K0,forecast(auto.arima(Y,allowdrift=TRUE),h=240)$mean)

MU=matrix(NA,length(A),length(K1))

MU1=MU2=MU

for(i in 1:length(A)){

for(j in 1:length(K1)){

MU1[i,j]=exp(A[i]+B[i]*K1[j])

MU2[i,j]=exp(A[i]+B[i]*K2[j])

}}

x=40

s=seq(0,109-x-1)

t=2000

Pxt1=cumprod(exp(-diag(MU1[x+1+s,t+s-base1$Year[1]-1])))

Pxt2=cumprod(exp(-diag(MU2[x+1+s,t+s-base1$Year[1]-1])))

r=.035

m=70

h=seq(0,39)

V1=1/(1+r)^(m-x+h)*Pxt1[m-x+h]

V2=1/(1+r)^(m-x+h)*Pxt2[m-x+h]

M=cbind(V1,V2)

apply(M,2,sum)

Actually, it is not that *bad*…. even if it is only a qualitative intuition. Again, I am not a demographer, and my interest is more on actuarial science… so if we look at the estimation of annuities (still the same insurance contract, as here) for some insured of age 40 in 2000, we get the following graph (where forecasts ‘s were obtained on the complete series, i.e. from 1816 until the year we consider),

(here it means that in 1900, I had to forecast mortality for someone of age 40 in 2000… so we had to forecast mortality with a 150 year horizon). Obviously, even if we are able to forecast *improvement* of mortality rates, it is not enough since it looks like, each year, improvement are alway higher than what what expected. Note that if we run it twice (since there might be problem with initial values in the econometric procedure) we obtain something similar,

So, the output is consistent. And if we change the way we predict future values, e.g. on focusing only on the past 50 years, i.e.

K1=c(K0,forecast(ets(Y[(length(Y)-50):length(Y)],

model="AAN"),h=240)$mean)

K2=c(K0,forecast(auto.arima(Y[(length(Y)-50):length(Y)],

allowdrift=TRUE),h=240)$mean)

we obtain the following graph for the annuity associated to an insurance contract sold in 2000,

so that relative changes compared with 1980 are (in %)

Hence, over a bit more than 25 years, we underestimated annuities of 25%. We if start to take into account possible investments, it is not so bad, I think…. don’t you think ?

**leave a comment**for the author, please follow the link and comment on their blog:

**Freakonometrics - Tag - R-english**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...