fit701: Newton-Raphson implementation to fit a single Lee-Carter...

View source: R/fit_li_lee.R

fit701R Documentation

Newton-Raphson implementation to fit a single Lee-Carter mortality model (M1)

Description

This internal function fits a Lee-Carter mortality model (type M1) with the use of Newton-Raphson. This mortality model M1 has the following form:

log m(t,x) = beta1(x) + beta2(x)*kappa2(t) + Poisson error

Usage

fit701(xv, yv, etx, dtx, wa, int, constraints, exclude_coh)

Arguments

xv

The vector of ages.

yv

The vector of years.

etx

m x n matrix of exposures.

dtx

m x n matrix of death counts.

wa

m x n matrix of weights (0 or 1).

int

The prespecified vector for beta1(x). When the zero-vector is supplied, the Newton_Raphson algorithm calibrates beta1(x)

constraints

Character string. If constraints = "ALL", two identifiability constraints are imposed (see details). If constraints == "ADJUST", only the constraint on beta2(x) is used.

exclude_coh

logical. If TRUE, the weights are set to zero for cohorts with fewer than 5 observations.

Details

The two identifiability constraints are:

kappa2(t1) = 0, sum(beta2(x)^2) = 1.

The BIC is defined as:

-2*l1 + log(sum(wa)),

and where the log-likelihood equals:

sum((dtx*log(etx*mhat.tx) - etx*mhat.tx - lgamma(dtx + 1))*wa).

Here, mhat.tx denotes the fitted forces of mortality, etx the exposure numbers and dtx the death counts.

Value

A list containing the fitted parameter estimates of the type M1 Lee-Carter model, as well as some model specifications.


RobbenJ/MultiMoMo documentation built on June 28, 2022, 9:29 p.m.