{'fraction_non_alphanumeric': 0.013761467889908258, 'fraction_numerical': 0.006422018348623854, 'mean_word_length': 5.731481481481482, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Continuous quality improvement in statistical code: avoiding errors and improving transparency

Clear communication of statistical approaches can ensure healthcare research is well understood, reduce major errors and promote the advancement of science. Yet in contrast to the increasing complexity of data and analyses, published methods sections are at times insufficient for describing necessary details. Therefore, ensuring the quality, transparency and reproducibility of statistical approaches in healthcare research is essential.1 2

Such concerns are not just theoretical and have direct implications for research in the quality and safety field. For example, the Hospital Readmissions Reduction Program was instituted in 2012 by the US Centers for Medicare & Medicaid Services (CMS) and imposed financial penalties on hospitals with high readmission rates. Subsequent studies sought to determine the extent to which this programme was successful in reducing readmissions without promoting unintended consequences, such as increased mortality. Clearly defining the success or failure of this programme is essential, but in 2018 two prominent articles using the same CMS data set presented opposing results.3 4 These conflicts are undoubtedly due to differences in analytical choices, but specific differences are challenging to reconcile given statistical code was unavailable to readers. In another recent example, a major article was retracted due to the discovery of a statistical coding error that reversed the categorisation of treatment and control groups.5 This clinical trial examined a support programme for hospitalised patients with chronic obstructive pulmonary disease, originally reporting a lower risk of hospitalisation and emergency department visits, but in actuality demonstrating the support programme was associated with harm. Both cases demonstrate how better practices with statistical coding sharing at the time of publication may improve the quality of research.

While the utility of statistical code sharing may seem self-evident, it occurs more infrequently than one would expect.2 We believe a principal barrier to statistical code sharing is …