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().
Mxc2e0abrvec(Mxcvec, dims, trans = FALSE)numeric life expectancy at birth
numeric vector, c(Mxc).
integer vector of length two, c(nrow(Mxc),ncol(Mxc)).
do we need to transpose in order to arrive back to an age-cause matrix?
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().