Lee-Carter model of mortality or fertility 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.
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
)
Object of class “lca” with the following components:
Name of region
Ages from data
object.
Years from data
object.
Matrix of mortality or fertility data as contained in data
. It takes the name given by the series argument.
Average deathrates across fitting period
First principal component in Lee-Carter model
Coefficient of first principal component
Functional time series of residuals.
Functional time series containing estimated mortality or fertility rates from model
Proportion of variance explained by model.
The data stored as a functional time series object.
Mean deviance of total and base lack of fit, as described in Booth, Maindonald and Smith.
demogdata object of type “mortality” or “fertility”. Output from read.demogdata.
name of series within data containing mortality or fertility values (1x1)
years to include in fit. Default: all available years.
ages to include in fit. Default: all available ages up to
max.age
.
upper age to include in fit. Ages beyond this are collapsed into the upper age group.
method to use for adjustment of coefficients \(k_t kt\).
Possibilities are “dxt” (BMS method), “dt” (Lee-Carter
method), “e0” (method based on life expectancy) and “none”.
Defaults are “dxt” for bms()
and “dt” for
lca()
.
If TRUE, it will choose the best fitting period.
Minimum number of years to include in fitting period if chooseperiod=TRUE.
method to use for identifying breakpoints if
chooseperiod=TRUE. Possibilities are “bai” (Bai's method computed
using breakpoints
in the strucchange package)
and “bms” (method based on mean deviance ratios described in BMS).
If TRUE, it will rescale bx and kt so that kt has drift parameter = 1.
method to use for calculating residuals. Possibilities are “logrates”, “rates” and “deaths”.
If TRUE, it will estimate any zero mortality or fertility rates using the same age group from nearby years.
Heather Booth, Leonie Tickle, John Maindonald and Rob J Hyndman.
All mortality or fertility data are assumed to be in matrices of
mortality or fertility 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 or fertility rate matrix
within data$rate
. Forecasts from this model can be obtained using forecast.lca
.
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.
forecast.lca
, plot.lca
, summary.lca
, fdm
if (FALSE) {
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