PCBDQCS: Poisson CBD with curvature and cohort model

View source: R/PCBDQCS.R

PCBDQCSR Documentation

Poisson CBD with curvature and cohort model

Description

Fits and forecasts mortality rates using CBD with curvature and cohort model with Poisson assumption.

Usage

PCBDQCS(
  x,
  D,
  E,
  curve = c("gompertz", "makeham", "perks", "weibull", "beard", "martinelle", "thatcher",
    "gompertz2", "makeham2", "perks2", "weibull2", "beard2", "martinelle2", "thatcher2"),
  h = 10,
  jumpoff = 1
)

Arguments

x

vector of ages.

D

matrix of death counts (rows as years and columns as ages).

E

matrix of mid-year exposures (rows as years and columns as ages).

curve

name of mortality curve for smoothing forecasted mortality rates (including gompertz, makeham, perks, weibull, beard, martinelle, thatcher, gompertz2, makeham2, perks2, weibull2, beard2, martinelle2, thatcher2, where first 7 curves' parameters are unconstrained and last 7 curves' parameters are generally restricted to be positive).

h

forecast horizon (default = 10).

jumpoff

if 1, forecasts are based on estimated parameters only; if 2, forecasts are anchored to observed mortality rates in final year (default = 1).

Details

The CBD with curvature and cohort (M7) model with Poisson assumption is specified as

ln(m_{x,t}) = \kappa_{1,t} + \kappa_{2,t} (x-\bar{x}) + \kappa_{3,t} ((x-\bar{x})^2-\sigma^2) + \gamma_{t-x} and D_{x,t} ~ Poisson(E_{x,t} m_{x,t}).

The model is estimated by Newton updating scheme and is forecasted by ARIMA applied to \kappa_{1,t}, \kappa_{2,t}, \kappa_{3,t}, and \gamma_c. Constraints include sum of \gamma_c is zero, sum of c\gamma_c is zero, and sum of c^{2}\gamma_c is zero. It is designed for ages 50-90.

Value

An object of class PCBDQCS with associated S3 methods coef, forecast (which = 1 for smoothed (default); which = 2 for raw), plot, and residuals.

References

Cairns, A.J.G., Blake, D., Dowd, K., Coughlan, G.D., Epstein, D., Ong, A., and Balevich, I. (2009). A quantitative comparison of stochastic mortality models using data from England and Wales and the United States. North American Actuarial Journal, 13(1), 1-35.

Examples

x <- 60:89
k1 <- -2.97-0.0245*(0:29)
k2 <- 0.101+0.000345*(0:29)
set.seed(123)
M <- exp(matrix(k1,nrow=30,ncol=30,byrow=FALSE)+outer(k2,(x-mean(x)))+rnorm(900,0,0.035))
E <- matrix(c(107788,108036,107481,106552,104608,100104,95803,91345,84980,79557,
75146,70559,65972,60898,55623,50522,47430,45895,41443,34774,
30531,27754,25105,22271,19437,16888,14458,12146,10038,7994),30,30,byrow=TRUE)
D <- round(E*M)
fit <- PCBDQCS(x=x,D=D,E=E,curve="makeham",h=30,jumpoff=2)
coef(fit)
forecast::forecast(fit)
plot(fit)
residuals(fit)


demofit documentation built on June 12, 2026, 1:07 a.m.