Closed milanwiedemann closed 3 years ago
@Lextuga007 I'm merging it as needed now, but would be good to add further functionality as discussed at some point later
The set age bands are https://cdu-data-science-team.github.io/team-blog/posts/2021-06-22-age-bands-methodology/ but it might be best, as this issue suggests, having a function to determine the age bands as required. The data warehouse has a SQL table function which takes the parameters DateOfBirth, OnDate, Range, Limit.
We've used the package epitools before to get the age on a given date as this function takes into account leap years https://www.rdocumentation.org/packages/eeptools/versions/1.2.4/topics/age_calc
add basic functionality for age groups (need to check that this all works on sql! @Lextuga007 can you plz give me some more info on these other grouping methods