Mxc2e0abrvec: get life expectancy at birth from the vec of an age-cause...

Description Usage Arguments Details Value

Description

Given a vector with abridged ages stacked within causes of death, assign its dimensions, take the age marginal sums using Mxc2e0abr, then calculate life expectancy at birth using LTabr().

Usage

1
Mxc2e0abrvec(Mxcvec, dims, trans = FALSE)

Arguments

Mxcvec

numeric vector, c(Mxc).

dims

integer vector of length two, c(nrow(Mxc),ncol(Mxc)).

trans

do we need to transpose in order to arrive back to an age-cause matrix?

Details

This assumes that the marginal row sums give all-cause mortality rates. Give an other category if you need to top-up to all-cause mortality. Do not include all-cause mortality itself! length(Mxcvec) must equal prod(dim(Mxc)). This function is meant to be fed to a generic decomposition function, such as stepwise_replacement(), or DecompContinuousOrig().

Value

numeric life expectancy at birth


DemoDecomp documentation built on May 2, 2019, 6:36 a.m.