Background Health economic models are increasingly used to inform decisions about the allocation of healthcare resources. Ensuring the robustness and reliability of these models is critical. Currently, quality assurance is conducted by both technical and non-technical experts assessing different components of the model manually. This is resource intensive. Understanding how the different components of the model fit together is time consuming, and testing every part of the model is sometimes not feasible in the time available. To aid in this, we have developed the assertHE R package. Methods The open-source assertHE package provides testing functionality for those building and reviewing health economic models built in R programming language. It provides a series of checks which can be integrated into the model development workflow to reduce the probability of common errors. It also provides a suite of functions which allow users to better understand the network of R functions contained in a model, where they are defined, if (and where) they are tested, and provides a simple metric to quantify the extent to which they are tested. Results We applied the assertHE package to three open-source health economic models built in R, showing how to include check functions within the model code and how to visualise the network of functions, see the test coverage, and obtain a Generative Pretrained Transformer Large Language Model (GPT-LLM) generated summary of any function in the code-base. We have worked with collaborators from industry, regulators and academia to develop the package to be applicable to the widest possible range of models, making adaptations to the source code based upon feedback. Conclusions assertHE offers an open-source toolkit for health economists building and reviewing models, promoting collaborative development and facilitating a more robust and efficient quality assurance process.
Read full abstract