Learn R Programming

demography (version 1.11)

forecast.fdm: Forecast functional demographic model.

Description

The coefficients from the fitted object are forecast using a univariate time series model. The forecast coefficients are then multiplied by the basis functions to obtain a forecast demographic rate curve.

Usage

## S3 method for class 'fdm':
forecast(object, h = 50, jumpchoice = c("fit", "actual"), method =
				 "arima", warnings=FALSE, ...)

Arguments

object
Output from fdm.
h
Forecast horizon.
jumpchoice
If "actual", the forecasts are bias-adjusted by the difference between the fit and the last year of observed data. Otherwise, no adjustment is used.
method
Forecasting method to be used.
warnings
If TRUE, warnings arising from the forecast models for coefficients will be shown. Most of these can be ignored, so the default is warnings=FALSE.
...
Other arguments as for forecast.ftsm.

Value

  • Object of class fmforecast with the following components:
  • labelName of region from which the data are taken.
  • ageAges from lcaout object.
  • yearYears from lcaout object.
  • rateList of matrices containing forecasts, lower bound and upper bound of prediction intervals. Point forecast matrix takes the same name as the series that has been forecast.
  • errorMatrix of one-step errors for historical data
  • fittedMatrix of one-step forecasts for historical data
  • coeffList of objects of type forecast containing the coefficients and their forecasts.
  • coeff.errorOne-step errors for each of the coefficients.
  • varList containing the various components of variance: model, error, mean, total and coeff.
  • modelFitted model in obj.
  • typeType of data: mortality, fertility or migration.

See Also

fdm, forecast.lca, forecast.ftsm.

Examples

Run this code
france.fit <- fdm(fr.mort,order=2)
france.fcast <- forecast(france.fit,50)
plot(france.fcast)
models(france.fcast)

Run the code above in your browser using DataLab