To calculate directly standardized (age and/or sex standardized) rates for PHUs and Ontario using the 2011 Canadian Population as the standard population.
1a. Import and save the standard population data
1b. Categorize age values into custom age groups
2a. Import and save the PHU population estimates
2b. (If using projections) Append the PHU population projections to the PHU population estimates
2c. Adjust the PHU names (to allow for merging later on)
2d. Keep only the observations of interest
2e. Categorize age values into custom age groups
3a. Import and save case data
3b. Adjust the PHU names (to allow for merging later on)
3c. Keep only the observations of interest
3d. Remove any duplicates
3e. Numerator: Collapse the individual level data by the strata of interest (i.e. phu, year, age, and/or sex). In other words, group the dataset by the strata and sum the number of cases in each strata.
3f. Denominator: Merge the PHU population data (denominator) with the case data (numerator)
4a. Apply direct standardization command for PHU
4b. Apply direct standardization command for province
5a. Export results to excel