robjhyndman / demography

demography package for R
https://pkg.robjhyndman.com/demography
73 stars 25 forks source link

FDM model: Forecast trajectory in the first steps #34

Closed mpascariu closed 5 years ago

mpascariu commented 5 years ago

Hi Rob,

I am using the fdm model to forecast age specific death rates. I have noticed an interesting behaviour of the forecast trajectory in the first 3 years, in the sense that the slope changes significantly from year to year. At some ages the change is more pronounced. See an example below for age 0 and 95.

Could you please indicate if this is normal and what is the reason behind it? The jumpchoice doesn't seem to influence it. Also this behaviour is not seen in the lca model.

Thanks. Marius

x0 x95

The figures can be reproduced using this code:

# Thu Aug 30 11:10:36 2018 --------- Marius D. Pascariu ---
remove(list = ls())
library(demography)

M <- fdm(fr.mort)
P <- forecast(france.fit, h = 5, jumpchoice = "actual")

x = 0
plot(P$rate$total[x + 1, ], type = "l", 
     ylab = paste0("m[", x,"]"), 
     xlab = "Forecast Year",
     main = paste("Forecast: Age-Specific Death Rate at age", x))

x = 95
plot(P$rate$total[x + 1, ], type = "l", 
     ylab = paste0("m[", x,"]"), 
     xlab = "Forecast Year",
     main = paste("Forecast: Age-Specific Death Rate at age", x))
mpascariu commented 5 years ago

I think it is the order. No reply needed.