Computes indirect adjusted rates and confidence intervals.
rate_adj_indirect(
.data,
.std,
.keys = NULL,
.name_var = "name",
.value_var = "value",
.age_group_var = "age_group",
.age_group_pop_var = "population",
.events_label = "events",
.population_label = "population",
.progress = TRUE
)A tibble with crude and adjusted rate, lower and upper confidence intervals.
A tibble containing events counts and population per groups (e.g. age groups)
A vector with standard population values for each group
Optional. A character vector with grouping variables, like year and region code.
Variable containing variable names. Defaults to name.
Variable containing values. Defaults to value.
Variable name of age groups. Defaults to age_group.
Variable name of population size on .std. Defaults to population.
Label used for events at the name_var variable. Defaults to events.
Label used for population at the name_var variable. Defautls to population.
Whether to show a progress bar. Defaults to TRUE.
This functions wraps the epitools ageadjust.indirect function to compute indirect adjusted rates and "exact" confidence intervals using tibble objects with multiple grouping keys.
A tibble (.data) must be informed containing key variables like year and region code, and population and and events count (e.g. cases) per age group. Check the fleiss_data for an example.
A tibble (.std) must be also supplied containing the age groups, events and population size. By default, this tibble has three variables, named age_group, name and value. Check the selvin_data_1940 for an example.
rate_adj_indirect(.data = selvin_data_1960, .std = selvin_data_1940)
Run the code above in your browser using DataLab