Generic function to expectancy
method.
expectancy(x, ...)
A data.frame and (if graph = TRUE) a plot for HP
, DLM
, ClosedHP
and ClosedDLM
methods.
A list that contains three vectors with the fitted values of life expectancy and the lower and upper limits of the credible intervals for each year used in fitted model or for the prediction, for BLC
and PredBLC
methods.
Object of one of these class: HP
, DLM
, BLC
, ClosedHP
, ClosedDLM
, BLC
, or PredBLC
.
Further arguments passed to or from other methods.
This function computes the life expectancy given by:
\(e_x = \sum tp_x\)
where:
\(tp_x = p_0 x p_1 x ... x p_x\)
expectancy.HP()
, expectancy.DLM()
and expectancy.BLC()
.