FDM {vital}R Documentation

Functional data model

Description

Functional data model of mortality or fertility rates as a function of age. FDM() returns a functional data model applied to the formula's response variable as a function of age.

Usage

FDM(formula, order = 6, ts_model_fn = fable::ARIMA, coherent = FALSE, ...)

Arguments

formula

Model specification.

order

Number of principal components to fit.

ts_model_fn

Univariate time series modelling function for the coefficients. Any model that works with the fable package is ok. Default is fable::ARIMA().

coherent

If TRUE, fitted models are stationary, other than for the case of a key variable taking the value geometric_mean. This is designed to work with vitals produced using make_pr(). Default is FALSE. It only works when ts_model_fn is ARIMA().

...

Not used.

Value

A model specification.

Author(s)

Rob J Hyndman

References

Hyndman, R. J., and Ullah, S. (2007) Robust forecasting of mortality and fertility rates: a functional data approach. Computational Statistics & Data Analysis, 5, 4942-4956. https://robjhyndman.com/publications/funcfor/ Hyndman, R. J., Booth, H., & Yasmeen, F. (2013). Coherent mortality forecasting: the product-ratio method with functional time series models. Demography, 50(1), 261-283. https://robjhyndman.com/publications/coherentfdm/

Examples

hu <- norway_mortality |>
  dplyr::filter(Sex == "Female", Year > 2010) |>
  smooth_mortality(Mortality) |>
  model(hyndman_ullah = FDM(log(.smooth)))
report(hu)
autoplot(hu)

[Package vital version 1.1.0 Index]