Estimates the case rate for a given variable, stratified by given variables, dependant on age, year, agegrp2, and uk birth status. Missing data for the rate variable is dropped.
case_rate(df, rate_for, strat_by = NULL, age_split = NULL, CoB_split = TRUE, Year_strat = TRUE)
df | A dataframe |
---|---|
rate_for | A character string indicating the variables to estiamte the rate for. |
strat_by | A character string indicating the variables to stratify by. |
age_split | A character string, defaults to |
CoB_split | Logical, defaults to |
Year_strat | Logical, defaults to |
A dataframe of case rates with upper and lower bounds
extract_case_counts