Learn R Programming

demography (version 1.11)

lca: Model mortality data using Lee-Carter approach

Description

Lee-Carter model of mortality rates. lca produces a standard Lee-Carter model by default, although many other options are available. bms is a wrapper for lca and returns a model based on the Booth-Maindonald-Smith methodology.

Usage

lca(data, series=names(data$rate)[1], years=data$year, 
    ages=data$age, max.age=100,
    adjust = c("dt", "dxt", "e0", "none"), chooseperiod=FALSE, 
    minperiod=20, breakmethod=c("bai","bms"), scale = FALSE, 
    restype = c("logrates", "rates", "deaths"), interpolate = FALSE)
bms(data, series=names(data$rate)[1], years=data$year, 
    ages=data$age, max.age=100, 
    minperiod = 20, breakmethod = c("bms", "bai"), scale = FALSE,
    restype = c("logrates", "rates", "deaths"), interpolate = FALSE)

Arguments

data
demogdata object of type mortality. Output from read.demogdata.
series
name of series within data containing mortality values (1x1)
years
years to include in fit. Default: all available years.
ages
ages to include in fit. Default: all available ages up to max.age.
max.age
upper age to include in fit. Ages beyond this are collapsed into the upper age group.
adjust
method to use for adjustment of coefficients $k_t$. Possibilities are dxt (BMS method), dt (Lee-Carter method), e0 (method based on life expectancy) and none. Defaults are dxt
chooseperiod
If TRUE, it will choose the best fitting period.
minperiod
Minimum number of years to include in fitting period if chooseperiod=TRUE.
breakmethod
method to use for identifying breakpoints if chooseperiod=TRUE. Possibilities are bai (Bai's method computed using breakpoints in the strucchange package) and b
scale
If TRUE, it will rescale bx and kt so that kt has drift parameter = 1.
restype
method to use for calculating residuals. Possibilities are logrates, rates and deaths.
interpolate
If TRUE, it will estimate any zero mortality rates using the same age group from nearby years.

Value

  • Object of class lca with the following components:
  • labelName of region
  • ageAges from data object.
  • yearYears from data object.
  • Matrix of mortality data as contained in data. It takes the name given by the series argument.
  • axAverage deathrates across fitting period
  • bxFirst principal component in Lee-Carter model
  • ktCoefficient of first principal component
  • residualsFunctional time series of residuals.
  • fittedFunctional time series containing estimated mortality rates from model
  • varpropProportion of variance explained by model.
  • yThe data stored as a functional time series object.
  • mdevMean deviance of total and base lack of fit, as described in Booth, Maindonald and Smith.

Details

All mortality data are assumed to be in matrices of mortality rates within data$rate. Each row is one age group (assumed to be single years). Each column is one year. The function produces a model for the series mortality rate matrix within data$rate. Forecasts from this model can be obtained using forecast.lca.

References

Booth, H., Maindonald, J., and Smith, L. (2002) Applying Lee-Carter under conditions of variable mortality decline. Population Studies, 56, 325-336. Lee, R.D., and Carter, L.R. (1992) Modeling and forecasting US mortality. Journal of the American Statistical Association, 87, 659-671.

See Also

forecast.lca, fdm

Examples

Run this code
france.LC1 <- lca(fr.mort,adjust="e0")
plot(france.LC1)
par(mfrow=c(1,2))
plot(fr.mort,years=1953:2002,ylim=c(-11,1))
plot(forecast(france.LC1,jumpchoice="actual"),ylim=c(-11,1))

france.bms <- bms(fr.mort,breakmethod="bai")
fcast.bms <- forecast(france.bms)
par(mfrow=c(1,1))
plot(fcast.bms$kt)

Run the code above in your browser using DataLab