case_rate: Function to estimate the case rate for a given variable

Description Usage Arguments Value See Also

View source: R/case_rate.R

Description

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.

Usage

1
2
case_rate(df, rate_for, strat_by = NULL, age_split = NULL,
  CoB_split = TRUE, Year_strat = TRUE)

Arguments

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 NULL. Specifies the age group to stratify for.

CoB_split

Logical, defaults to TRUE. Should the case rate be grouped by the country of birth.

Year_strat

Logical, defaults to TRUE. Should the case rate be grouped by year.

Value

A dataframe of case rates with upper and lower bounds

See Also

extract_case_counts


seabbs/DirectEffBCGPolicyChange documentation built on Dec. 14, 2019, 9:24 p.m.