The Use of Copilot, a Generative Artificial Intelligence Tool, as VBA Programming Assistant in Excel-Based Health Economic Models

Author(s)

Poirrier JE1, Bergemann R2
1Parexel International, Wavre, WBR, Belgium, 2Parexel International, Loerrach, Germany

OBJECTIVES: This study aims 1) to test how health economists can take advantage of Copilot, a GPT-3-based artificial intelligence tool developed by GitHub and OpenAI, in their cost-effectiveness model development in MS Excel/VBA and 2) to draw attention on some non-programming issues related to the use of AI in programming.

METHODS: An existing CEM for the treatment of Urinary Tract Infection in hospitalized patients was stripped from its VBA code for some interface interactions, for the creation of the cost-effectiveness (CE) frontier and for the Probabilistic Sensitivity Analysis (PSA). Copilot was then prompted to rewrite the code from scratch, first with general prompts, then with step-by-step requests. The generated code was analyzed by an experienced VBA developer to assess quality, verboseness, and performance.

RESULTS: General prompts failed at generating any effective VBA code. Deconstructed algorithms for the CE frontier and the PSA generated effective working code. Performances (runtime) and quality were similar to code generated by an experienced developer.

CONCLUSIONS: This study showed it is feasible to use Copilot to generate VBA code in a CEM. However, the quality and verboseness of the generated code is depending on the user’s detailed requests. The CEM-specific user interface built in sheets contributes to difficulties in generating usable VBA code with Copilot. Copilot will probably accelerate model development for junior developers. But more experienced programmers will need to wait for improvements from GPT-4 and an increased VBA codex. Further research and development of more intelligent GAI algorithms is therefore necessary for the introduction on daily routine. More broadly, potential issues of code explainability, ownership and licensing need to be clarified.

Conference/Value in Health Info

2023-11, ISPOR Europe 2023, Copenhagen, Denmark

Value in Health, Volume 26, Issue 11, S2 (December 2023)

Code

MSR26

Topic

Economic Evaluation, Methodological & Statistical Research

Topic Subcategory

Artificial Intelligence, Machine Learning, Predictive Analytics, Cost-comparison, Effectiveness, Utility, Benefit Analysis

Disease

No Additional Disease & Conditions/Specialized Treatment Areas

Explore Related HEOR by Topic


Your browser is out-of-date

ISPOR recommends that you update your browser for more security, speed and the best experience on ispor.org. Update my browser now

×