# NOT RUN {
# Load simulated data as example
data(aggreg_data)
data(pop_ref)
# Estimate remaining life expectancy and Life Years
# Lost after each age from 40 to 89 years and before age 90 years
lyl_summary_data <- lyl_aggregated_range(data = aggreg_data, age = age,
rates = rate, weights = new_cases,
data0 = pop_ref, age0 = age, surv0 = survival,
age_begin = 40, age_end = 89, tau = 90)
# Summarize the data
summary(lyl_summary_data)
# }
Run the code above in your browser using DataLab