Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

residuals.fdm

Compute residuals and fitted values from functional demographic model or Lee-Carter model


Description

After fitting a Lee-Carter model or functional demographic model, it is useful to inspect the residuals or plot the fitted values. These functions extract the relevant information from the fit object.

Usage

## S3 method for class 'fdm'
residuals(object, ...)

## S3 method for class 'fdm'
fitted(object, ...)

## S3 method for class 'lca'
fitted(object, ...)

## S3 method for class 'lca'
residuals(object, ...)

Arguments

object

Output from fdm or lca.

...

Other arguments.

Value

residuals.fdm and residuals.lca produce an object of class “fmres” containing the residuals from the model. fitted.fdm and fitted.lca produce an object of class “fts” containing the fitted values from the model.

Author(s)

Rob J Hyndman.

See Also

Examples

fit1 <- lca(fr.mort)
  plot(residuals(fit1))
  plot(fitted(fit1))

demography

Forecasting Mortality, Fertility, Migration and Population Data

v1.22
GPL (>= 2)
Authors
Rob J Hyndman with contributions from Heather Booth, Leonie Tickle and John Maindonald.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.