mpascariu / MortalityLaws

Fit and compare the most popular human mortality laws - R package
Other
30 stars 8 forks source link

Issues Faced When Modeling and Forecasting Using Heligman Pollard #18

Closed Wilsonnn245 closed 1 year ago

Wilsonnn245 commented 1 year ago

Hi, I'm facing some issues when fitting and forecasting using the HP model as I'm still new to using R:

  1. I'm unable to generate a plot of the fitted values and its parameters. These are the codes I'm using: image

And its output: image image

For reference, I'm looking for something like this when plotting the HP parameters: image

  1. From the users' guide, there's an explanation to extrapolate the fitted values to the older ages. However, there's no mention of using the package to forecasting using the HP model. Are the forecasting methods not included in the package? If so, how should I code using R to forecast the mortality rates using HP model? I've read in a past research that they forecast each of the parameter using ARIMA model and plug the values into the HP model to get the forecasted rates, or is there a more suitable forecasting method, please advice.

Appreciate your help on the matter, thanks in advance :)

mpascariu commented 1 year ago
  1. As you can see in the error message the plot functionality is not offered for objects containing multiple calibrations. It's just a limitation of the package. Fit one model at the time if a standard plot is needed.
  2. Forecasting methods are not included in the package. If you really want to work with the H-P mortality model, time-series methods like ARIMA or multivariate ARMA models for forecasting coefficients might work. Give it a try and let us know what you discover ðŸ¤