Smith Robert, Schneider Paul
School of Health and Related Research, University of Sheffield, Regents Court, Sheffield, S1 4DA, UK.
Wellcome Open Res. 2020 Jul 31;5:69. doi: 10.12688/wellcomeopenres.15807.2. eCollection 2020.
Health economic evaluation models have traditionally been built in Microsoft Excel, but more sophisticated tools are increasingly being used as model complexity and computational requirements increase. Of all the programming languages, R is most popular amongst health economists because it has a plethora of user created packages and is highly flexible. However, even with an integrated development environment such as R Studio, R lacks a simple point and click user interface and therefore requires some programming ability. This might make the switch from Microsoft Excel to R seem daunting, and it might make it difficult to directly communicate results with decisions makers and other stakeholders. The R package Shiny has the potential to resolve this limitation. It allows programmers to embed health economic models developed in R into interactive web browser based user interfaces. Users can specify their own assumptions about model parameters and run different scenario analyses, which, in the case of regular a Markov model, can be computed within seconds. This paper provides a tutorial on how to wrap a health economic model built in R into a Shiny application. We use a four-state Markov model developed by the Decision Analysis in R for Technologies in Health (DARTH) group as a case-study to demonstrate main principles and basic functionality. A more extensive tutorial, all code, and data are provided in a GitHub repository.
传统上,健康经济评估模型是在Microsoft Excel中构建的,但随着模型复杂性和计算要求的增加,越来越多复杂的工具被投入使用。在所有编程语言中,R在健康经济学家中最受欢迎,因为它有大量用户创建的包,并且高度灵活。然而,即使有像R Studio这样的集成开发环境,R也缺乏简单的点击式用户界面,因此需要一定的编程能力。这可能会使从Microsoft Excel切换到R看起来令人生畏,并且可能难以与决策者和其他利益相关者直接交流结果。R包Shiny有潜力解决这一限制。它允许程序员将在R中开发的健康经济模型嵌入基于交互式网页浏览器的用户界面。用户可以指定自己关于模型参数的假设并运行不同的情景分析,对于常规的马尔可夫模型,这些分析可以在几秒钟内完成计算。本文提供了一个教程,介绍如何将在R中构建的健康经济模型包装成一个Shiny应用程序。我们使用由健康技术R决策分析(DARTH)小组开发的四状态马尔可夫模型作为案例研究,来演示主要原理和基本功能。在GitHub存储库中提供了更详细的教程、所有代码和数据。