# Goal: determine YLL attributable to air pollution exposure during one year
# using the life table approach
results <- attribute_lifetable(
health_outcome = "yll",
approach_exposure = "single_year",
approach_newborns = "without_newborns",
exp_central = 8.85,
prop_pop_exp = 1,
cutoff_central = 5,
rr_central = 1.118,
rr_increment = 10,
erf_shape = "log_linear",
age_group = exdat_lifetable$age_group,
sex = exdat_lifetable$sex,
bhd_central = exdat_lifetable$deaths,
population = exdat_lifetable$midyear_population,
year_of_analysis = 2019,
min_age = 20
)
results$health_main$impact # Attributable YLL
# Goal: determine attributable premature deaths due to air pollution exposure
# during one year using the life table approach
results_pm_deaths <- attribute_lifetable(
health_outcome = "deaths",
approach_exposure = "single_year",
exp_central = 8.85,
prop_pop_exp = 1,
cutoff_central = 5,
rr_central = 1.118,
rr_increment = 10,
erf_shape = "log_linear",
age_group = exdat_lifetable$age_group,
sex = exdat_lifetable$sex,
bhd_central = exdat_lifetable$deaths,
population = exdat_lifetable$midyear_population,
year_of_analysis = 2019,
min_age = 20
)
results_pm_deaths$health_main$impact # Attributable premature deaths
# Goal: determine YLL attributable to air pollution exposure (exposure distribution)
# during one year using the life table approach
results <- attribute_lifetable(
health_outcome = "yll",
exp_central = rep(c(8, 9, 10), each = 100*2), # each = length of sex or age_group vector
prop_pop_exp = rep(c(0.2, 0.3, 0.5), each = 100*2), # each = length of sex or age_group vector
cutoff_central = 5,
rr_central = 1.118,
rr_lower = 1.06,
rr_upper = 1.179,
rr_increment = 10,
erf_shape = "log_linear",
age_group = rep(
exdat_lifetable$age_group,
times = 3), # times = number of exposure categories
sex = rep(
exdat_lifetable$sex,
times = 3), # times = number of exposure categories
population = rep(
exdat_lifetable$midyear_population,
times = 3), # times = number of exposure categories
bhd_central = rep(
exdat_lifetable$deaths,
times = 3), # times = number of exposure categories
year_of_analysis = 2019,
min_age = 20
)
results$health_main$impact_rounded # Attributable YLL
Run the code above in your browser using DataLab