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)
max.age
.bms()
and dt for lca()
.breakpoints
in the strucchange package)
and bms (method based on mean deviance ratios described in BMS).
data
object.data
object.data
. It takes the name given by the series argument.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
.Lee, R.D., and Carter, L.R. (1992) Modeling and forecasting US mortality. Journal of the American Statistical Association, 87, 659-671.
forecast.lca
, fdm
## Not run:
# 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)
# ## End(Not run)
Run the code above in your browser using DataLab