opensafely-core / r-docker

Docker image for running R scripts in OpenSAFELY
1 stars 3 forks source link

add PHEindicatormethods package #129

Closed lsempe77 closed 1 year ago

lsempe77 commented 1 year ago

Functions to calculate commonly used public health statistics and their confidence intervals using methods approved for use in the production of Public Health England indicators such as those presented via Fingertips (http://fingertips.phe.org.uk/). It provides functions for the generation of proportions, crude rates, means, directly standardised rates, indirectly standardised rates, standardised mortality ratios, slope and relative index of inequality and life expectancy. Statistical methods are referenced in the following publications. Breslow NE, Day NE (1987) <doi:10.1002/sim.4780080614>. Dobson et al (1991) <doi:10.1002/sim.4780100317>. Armitage P, Berry G (2002) <doi:10.1002/9780470773666>. Wilson EB. (1927) <doi:10.1080/01621459.1927.10502953>. Altman DG et al (2000, ISBN: 978-0-727-91375-3). Chiang CL. (1968, ISBN: 978-0-882-75200-6). Newell C. (1994, ISBN: 978-0-898-62451-9). Eayres DP, Williams ES (2004) <doi:10.1136/jech.2003.009654>. Silcocks PBS et al (2001) <doi:10.1136/jech.55.1.38>. Low and Low (2004) <doi:10.1093/pubmed/fdh175>.

remlapmot commented 1 year ago

Message to the team - I think you'll have to go back to version 1.3.2 of this to get it into the image.

just add-package PHEindicatormethods@1.3.2

This is because,

wjchulme commented 1 year ago

I've considered adding this package before, because there's been an interest in having a reusuable action for direct age-sex standardisation of rates. In the end I wrote a prototype without dependence on an external package, as it's fairly straight-forward to do (including automatic small-number suppression). Note that this is not a final version, it's a walking skeleton awaiting review and input from test users.

@lsempe77 if you think you might benefit from this functionality then I'd be keen to have your input.

wjchulme commented 1 year ago

Either way I've no objection to this package being added

evansd commented 1 year ago

Thanks @remlapmot as always!