This function obtains age-standardized health impacts based on multiple age-group specific assessments
Arguments
- output_attribute
Listcontaining the outputs of thehealthiar::attribute_health()assessments for each age group (each list element should be an age group-specific assessment).- age_group
String vectorwith the age groups included in the age standardization. The vector refers to age-dependent data in this function and tooutput_attribute(if provided).- ref_prop_pop
Numeric vectorspecifying with the reference proportion of population for each age group. If this argument is empty, the proportion ofpopulationby age group in the provided data will be used.
Value
This function returns a list containing:
1) health_main (tibble) containing the age-standardized main results;
2) health_detailed (tibble) containing the results per age group.
Examples
# Goal: age-standardize two age group-specific impacts
output_attribute <- attribute_health(
rr_central = 1.063,
rr_increment = 10,
erf_shape = "log_linear",
cutoff_central = 0,
age_group = c("below_40", "above_40"),
exp_central = c(8.1, 10.9),
bhd_central = c(1000, 4000),
population = c(100000, 500000)
)
results <- standardize(
output_attribute = output_attribute,
age_group = c("below_40", "above_40"),
ref_prop_pop = c(0.5, 0.5)
)
results$health_detailed$impact_per_100k_inhab # age group-specific impact rate
#> [1] 48.28250 51.53977
results$health_main$impact_per_100k_inhab # age-standardized impact rate
#> [1] 49.91113
