Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

age limits in e0 #9

Open
robjhyndman opened this issue Jan 16, 2014 · 0 comments
Open

age limits in e0 #9

robjhyndman opened this issue Jan 16, 2014 · 0 comments
Assignees

Comments

@robjhyndman
Copy link
Owner

A couple of refinements needed for e0 calculations - to do with minimum and maximum ages for life table calculations.

Usage

life.expectancy(data, series = names(data$rate)[1], years = data$year,
type = c("period", "cohort"), age = min(data$age),
max.age = min(100, max(data$age)))
flife.expectancy(data, series=NULL, years = data$year, type = c("period", "cohort"),
age = min(data$age), max.age = NULL, PI = FALSE, nsim = 500, ...)
e0(data, series = NULL, years = data$year, type = c("period", "cohort"),
max.age = NULL, PI = FALSE, nsim = 500, ...)

lifetable(data, series = names(data$rate)[1], years = data$year,
ages = data$age, max.age = min(100, max(data$age)),
type = c("period", "cohort"))

MINIMUM AGE is picked up from data in life.expectancy() and flife.expectancy() parameters but this is not used in e0()

e0
function (data, series = NULL, years = data$year, type = c("period",
"cohort"), max.age = NULL, PI = FALSE, nsim = 500, ...)
{
flife.expectancy(data, series = series, years = years, age = 0,
type = type, max.age = max.age, PI = PI, nsim = nsim,
...)
}

MAXIMUM AGE is not allowed to be greater than 100 by virtue of
max.age = min(100, max(data$age) in life.expectancy() and lifetable

If the user is happy with the smoothed rates at 110+, there is no reason not to allow the life table and life expectancy to use data to 110+. So specifying a max.age of 110 does not result in a forecast at ages 0-110+.

Grateful if specified minimum and maximum ages are carried through. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants