Prevent or Wait and Treat

Modeling Health Conditions with Preventive and Acute Therapeutic Options in R


Matthew Stargardter, MA
Research Associate
Evidence Synthesis, Modeling & Communication
Evidera, a PPD business
Aditya Sardesai, MSc
Research Associate
Evidence Synthesis, Modeling & Communication
Evidera, a PPD business
Sandra Milev, MSc
Research Scientist and Director
Evidence Synthesis, Modeling & Communication
Evidera, a PPD business


Prevention is broadly understood to refer to measures intended to avoid realization of undesirable outcomes. In the context of healthcare delivery, these outcomes typically consist of injury, disease, and the downstream financial, individual, and societal burdens with which ill health is commonly associated.1 Prevention types can be categorized in three ways:

  • Primary prevention activities, such as immunization against infectious diseases or physical activity to manage body mass index (BMI), aim to avoid the development of a disease or condition
  • Secondary prevention activities, such as administration of low-dose aspirin to reduce the risk of a second heart attack or stroke, aim to prevent recurrence of a medical problem that has already manifested
  • Tertiary prevention seeks to alleviate the long-term effects of an ongoing illness (e.g., rehabilitation or chronic disease management programs)

Health economists and policymakers have long debated whether an ounce of prevention does indeed outweigh a pound of cure. One perspective is that preventive services are worthwhile only when cost-saving. A dissenting view is that such interventions are worthwhile if they offer value for money (i.e., they are cost effective),2 while still other commentators focus solely on their capacity to save and/or promote the quality of human lives.3

This article describes the development of a de novo economic model in R designed to study the cost effectiveness of preventive and acute treatments when these are administered concurrently. We first outline the model’s structure and discuss the rationale for selecting R as the platform for model implementation. We next demonstrate the model’s application with reference to therapies for patients managing migraine in the United States (US). Finally, we discuss the implications of our findings as they relate specifically to the treatment landscape for migraine and more generally to economic modeling of preventive health interventions.

    Model Framework

    The modeling framework is equipped to model situations in which an underlying health condition manifests in a series of regularly occurring episodes that contribute to increased medical resource utilization and/or detract from health-related quality of life. Some existing or prospective interventions may be applied when an episode occurs to help manage any detrimental impacts (i.e., acute treatments), while others may be specifically intended to minimize the frequency with which episodes occur (i.e., preventive treatments).

    The model has a nested structure consisting of “micro” and “macro” levels (See Figure 1). At the macro level, disease episodes occur periodically over a predefined time span (one year). Preventive treatments serve to reduce the likelihood of experiencing an episode, which translates into fewer episodes.

    Figure 1. Diagrammatic Representation of the Model

      The micro level simulates in detail the events that follow within an episode, each of which consists of relatively short-lived incidents that result in accrual of direct (medical) losses and reduced patient quality of life. Physicians can administer treatments to manage the duration and severity of symptoms, although these may or may not be effective during any specific episode, necessitating other interventions.

      To operationalize this framework, we developed a decision analytic model to study how the selection of acute agents impacts resolution of the average episode. Output from the decision model then feeds into a second set of calculations that evaluates the longer-term implications of how the episodes are managed. This macro-level lens further accounts for the impact of preventive treatments.

      This modeling framework is suitable for representing a variety of common health conditions, including but not limited to those referenced in the introduction. In the remainder of this article, we demonstrate how the model can be readily applied to examine the cost effectiveness of prospective treatment options for migraine in the US.

        Why Did We Select R?

        Microsoft Excel (paired, where appropriate, with Visual Basic for Applications [VBA]) has long been a mainstay of health economics and outcomes research (HEOR) due to its widespread accessibility, perceived transparency, and familiarity to modelers, industry, and regulatory submission bodies alike.4 Recent years, however, have witnessed expanding utilization of other platforms for implementing some or all components of health economic modeling projects, and R has rapidly grown in popularity due to its low (zero) cost; its capacity to perform analyses or operations that might be difficult or cumbersome to implement in Excel (e.g., model calibration)5; seamless integration of statistical analyses and health economic modeling that facilitates validation5-7; potential for reductions in model run-time relative to other software5-7; access to utilities that allow for automated generation of customizable, high quality graphics7; and, integration with the R package Shiny, which facilitates construction of interactive web browser-based user interfaces, allowing users with minimal programming experience to easily navigate sophisticated health economic models.4,8

        A further advantage of R as a tool for HEOR is the presence of a sizable and dedicated user community that has developed a wide variety of freely available add-ins (“packages”) to further extend its functionality.9 One such group, the Decision Analysis in R for Technologies in Health (DARTH) workgroup, freely disseminates a variety of utilities intended to accelerate update of R within HEOR.10 We acknowledge our indebtedness to DARTH for two such utilities, the Decision-Analytic Modeling Package (dampack) and the Decision Tree Constructor (dectree),9,11-14 which we employ in the analyses summarized below.

          Modeling Migraine Acute and Preventive Treatments as a Case Study

          Migraine is a debilitating, recurrent primary headache disorder with severe, incapacitating neurological symptoms that affects approximately 36 million individuals (or 1 in 7 adults) in the US.15 Migraine patients experiencing 14 or fewer headaches per month are said to suffer from episodic migraines, while those with 15 or more days of headache per month are considered to have chronic migraines.16

          Within this context, the goals of pharmacotherapy revolve around minimizing the detrimental impact of migraines upon the individual, and the frequency of episodes.16,17 In particular, administration of acute therapies aims to alleviate symptoms rapidly and consistently and minimize use of rescue medications, while preventive therapies are intended to manage the frequency, severity, and duration of attacks and reliance upon acute treatments.17 This model considers two acute treatments: standard of care (SOC), mainly consisting of use of simple analgesics and oral triptans, and a second hypothetical agent that is more effective but also more costly than SOC. In addition, it considers the clinical and economic outcomes associated with utilization or non-utilization of preventive agents. It is important to note that the non-SOC acute agent and the preventive agent referenced in this example are hypothetical, in that their cost and efficacy are not intended to reflect the attributes of any existing treatment for migraine.

            The core of the model is a decision tree—depicted in Figure 2—which represents key clinical events observed during a typical migraine episode. Patients self-administer acute treatment when a migraine occurs. At two hours, they may or may not experience freedom from pain. If so, they sustain this response or later experience recurrence. If not, or if recurrence takes place, the patient may receive a second dose of the original treatment, or rescue medication; visit the emergency room (ER); be hospitalized; or, do nothing. Patients administered a second dose, or a rescue medication, may or may not subsequently experience relief from symptoms, but if not, they cannot employ the same treatment option for the duration of the episode. In addition to this, patients and their physicians can reduce the frequency with which they experience migraines by adhering to prescribed preventive treatments. A visual representation of the model in its entirety, which encompasses both acute and preventive aspects of treatment, appears in the form of an influence diagram (See Figure 3).

            Figure 2. Diagrammatic Representation of the Decision Tree

              As SOC for acute treatment of migraines is relatively inexpensive, we assume a price of $1/dose, whereas the hypothetical comparator is assumed to cost $30/dose. As noted, however, the latter is more effective, in that it doubles the likelihood of freedom from pain at 2 and 24 hours from 25% to 50% and reduces the risk of recurrence from 33% to 25%. Patients experience an average of 9 headache days per month. Administering a preventive agent can reduce the average number of headache days per month by half. The preventive medication is assumed to cost $450 per month.

              On days without headaches, the model assumes individuals accrue utility of 0.96.18 Utility accrued during days with headaches—0.605—is the weighted sum of time accrued while free from pain, and time in pain (itself the weighted average of migraine severity and utility corresponding to each “grade” of severity).18,19

              For simplicity, we assume no cost or utility associated with occurrence of adverse events.

              Figure 3. Influence Diagram for the Migraine Model


                The model was developed with the flexibility to analyze the cost effectiveness of individual treatments or a complete treatment strategy. To demonstrate this, this study examines market scenarios typical of the introduction of a new acute and/or preventive treatment.

                Cost-Effectiveness Analyses

                The first analysis considered the introduction of a hypothetical acute treatment for migraine into a market where an effective standard of care exists. The results of our analysis showed that at an assumed price of $30 per dose, doubling the treatment effect was not enough for the new treatment to be considered cost effective relative to the traditional threshold of $100,000 per quality-adjusted life year (QALY). The presence of a preventive treatment option has no bearing on these results, since the model assumes preventive treatments have no impact on the severity of migraine episodes. Of note, while utilization of a preventive alongside acute treatment does not impact estimated cost-effectiveness, it would likely have significant implications with respect to the budgetary impact of treatment for migraine among plan members. A second analysis considered the cost effectiveness of a preventive treatment supplied alongside either the SOC acute treatment or the hypothetical new treatment described above. The results of this analysis also indicate that prevention would be considered cost effective when administered alongside the hypothetical acute agent (incremental cost-effectiveness ratio [ICER]: $91,083), but not when given with the SOC (ICER: $107,067). These findings speak to the potential for effective preventive options to reduce the overall use of acute agents, albeit at a higher overall expenditure. Results for both analyses are presented in Figure 4.

                Figure 4. Cost-effectiveness Results

                  Economically Justifiable Price

                  The model calculates the economically justifiable price (EJP) (i.e., the price at which the estimated ICER is equal to a given cost-effectiveness threshold).

                  The EJP for the hypothetical acute agent is estimated at $22.90 per dose (i.e., 76.3% of the base case value), irrespective of whether a preventive treatment is administered concurrently. This corroborates the earlier finding that the clinical efficacy of the hypothetical agent is not sufficiently superior to achieve cost effectiveness at its original price. The insensitivity of the price of the acute treatment to the presence of a preventive again reflects the intuition that the cost and QALYs accrued as a result of utilization of the acute agent increase and decrease proportionally with changes in the number of episodes a patient experiences.

                  For preventive agents, the model indicates that given its assumed level of efficacy in reducing monthly episodes of migraine, the preventive agent would be deemed cost-effective at a monthly cost of $429.26 and $468.78 for a threshold of $100,000 per QALY, when paired with the SOC and hypothetical acute agents, respectively. Intuitively, the efficacy of the preventive agent cannot justify its price when it is offered alongside the relatively inexpensive SOC acute agent but sufficient to do so when used with the comparatively costly hypothetical acute agent. This fully corroborates the result that the preventive agent is cost-effective at a price of $450.00 per month when administered in conjunction with the latter but not the former.

                    Finally, the model calculates the EJP for a preventive when used with an optimally priced hypothetical acute. In this case, when the cost of the hypothetical acute is lowered to its EJP of $22.90, the preventive agent is deemed cost-effective at a monthly cost of $429.00 at a threshold of $100,000 per QALY, which is identical to the EJP for the SOC acute. This reflects the fact that when the hypothetical acute is optimally priced, the net monetary benefit of both acute agents is equalized. EJP calculation results appear in Figure 5.

                    Figure 5. EJP Results

                      Episodes Reduction

                      To further understand the impact of introducing a preventive treatment into the market, the model calculates the average reduction in monthly migraine episodes required for a preventive to achieve cost effectiveness at its current price and a threshold of $100,000 per QALY.

                      The results indicate that given its assumed price, the preventive treatment would be considered marginally effective with a reduction in monthly episodes of migraine of 52.0% and 47.6% when used with the SOC and hypothetical acute agents, respectively (as compared to its assumed value of 50.0%).


                        Health economists and policymakers have long been interested in methods for assessing the cost effectiveness of interventions that focus on avoiding or forestalling ill health. We sought to contribute to this active debate through the development of a de novo health economic model designed to explore the use of a preventive agent alongside acute treatment. In this study, we demonstrated the application of the model within the context of migraine, although the same concept of the model could be applied to other therapeutic areas with preventive treatments.

                        In these instances, our analyses suggest preventive and acute treatments should be evaluated jointly to aid decision makers in allocating scarce healthcare resources. Assessments of new acute treatments that do not account for current preventive options—or vice versa—may generate inaccurate conclusions, as they fail to consider contextual factors that can impact how much value for money new health interventions are likely to deliver. Our analysis, for instance, suggests a new preventive for treatment of migraine that fails to meet cost-effectiveness thresholds in the context of a treatment landscape characterized by widespread use of inexpensive SOC acute agents may produce increasingly favorable ICERs if it is assumed to accompany (and to have the potential to reduce utilization of) costlier next-generation acute products.

                        By implication, the timing of cost-effectiveness analyses is critical. When a new treatment is introduced to the market, available evidence may preclude consideration of all factors that may significantly influence analytical results. Accordingly, we argue that there is potential value in reassessing the cost effectiveness, such as in our case study of preventive interventions whenever the treatment landscape evolves in ways that may overturn conclusions generated by prior evaluations.

                          This study also demonstrates the utility of compiling and presenting ICERs generated from cost-effectiveness analyses alongside alternative metrics that provide added insight into the value for money associated with new health interventions. Where applicable, measures such as the economically justifiable price or justifiable reduction in monthly migraine episodes offer new ways of communicating the results of health economic assessments and could be useful in price negotiation discussions with payers.

                          Finally, this study illustrates the viability and strengths of R as a platform for health economic modeling. This analysis, for example, benefited significantly from our ability to readily extend the functionality of R by exploiting the availability of the Decision-Analytic Modeling Package (dampack) and the Decision Tree Constructor (dectree) add-ins developed. In addition, validation was facilitated by the fact that the entirety of the model is contained within a single script rather than being distributed across multiple worksheets, named ranges, and VBA modules. Finally, integration with the R package Shiny enabled us to
                          construct an interactive web browser-based user interface, freely accessible to readers (R Migraine Model), that allows users with minimal programming experience to readily reproduce our results or generate their own scenarios without any need to interact with the code underpinning the model.


                            1. Cohen JT, Neumann PJ, Weinstein MC. Does Preventive Care Save Money? Health Economics and the Presidential Candidates. N Engl J Med. 2008 Feb 14;358(7):661-3. doi: 10.1056/NEJMp0708558.
                            2. Maciosek MV, Coffield AB, Flottemesch TJ, Edwards NM, Solberg LI. Greater Use of Preventive Services in U.S. Health Care Could Save Lives at Little or No Cost. Health Aff (Millwood). 2010 Sep;29(9):1656-60. doi: 10.1377/hlthaff.2008.0701.
                            3. AAFP. Jones K. Does Prevention Save Money? That’s the Wrong Question. 2016 Apr. Available at: Accessed September 10, 2020.
                            4. Hart R, Burns D, Ramaekers B, Ren S, Gladwell D, Sullivan W, Davison N, Saunders O, Sly I, Cain T, Lee D. R and Shiny for Cost-Effectiveness Analyses: Why and When? A Hypothetical Case Study. Pharmacoeconomics. 2020 Jul;38(7):765-776. doi: 10.1007/s40273-020-00903-9.
                            5. Incerti D, Thom H, Baio G, Jansen JP. R You Still Using Excel? The Advantages of Modern Software Tools for Health Technology Assessment. Value Health. 2019 May;22(5):575-579. doi: 10.1016/j.jval.2019.01.003.
                            6. Baio G, Heath A. When Simple Becomes Complicated: Why Excel Should Lose its Place at the Top Table. Global & Regional Health Technology Assessment. 2017 Jan. doi:10.5301/grhta.5000247.
                            7. Wright A, Embleton N, Langham S. PRM139 – Choosing the Right Software for HTA Economic Models: A Comparison of Four Programmes Recommended by the National Institute of Health and Care Excellence. Value Health. 2018;21: S1-S481.
                            8. Smith R, Schneider P. Making Health Economic Models Shiny: A Tutorial. Wellcome Open Res. 2020 Apr 14; 5:69. doi: 10.12688/wellcomeopenres.15807.1. eCollection 2020.
                            9. Jalal H, Pechlivanoglou P, Krijkamp E, Alarid-Escudero F, Enns E, Hunink MGM. An Overview of R in Health Decision Sciences. Med Decis Making. 2017 Oct;37(7):735-746. doi: 10.1177/0272989X16686559. Epub 2017 Jan 6.
                            10. DARTH. Facilitate Your Decision Modelling. Available at: Accessed September 11, 2020.
                            11. GitHub. DARTH-git/dampack. Decision Analytic Modeling Package (dampack) [program]. 0.20 version, 2020. Available at: Accessed September 11, 2020.
                            12. Krijkamp EM, Alarid-Escudero F, Enns EA, Jalal HJ, Hunink MGM, Pechlivanoglou P. Microsimulation Modeling for Health Decision Sciences Using R: A Tutorial. Med Decis Making. 2018 Apr;38(3):400-422. doi: 10.1177/0272989X18754513.
                            13. Krijkamp EM, Alarid-Escudero F, Enns EA, Pechlivanoglou P, Hunink MGM, Yang A, Jalal HJ. A Multidimensional Array Representation of State-Transition Model Dynamics. Med Decis Making. 2020 Feb;40(2):242-248. doi: 10.1177/0272989X19893973. Epub 2020 Jan 28.
                            14. Decision Tree Constructor. DARTH-git/Dectree. Available at: Accessed September 11, 2020.
                            15. Burch RC, Loder S, Loder E, Smitherman TA. The Prevalence and Burden of Migraine and Severe Headache in the United States: Updated Statistics from Government Health Surveillance Studies. Headache. 2015 Jan;55(1):21-34. doi: 10.1111/head.12482.
                            16. Cady RK, Farmer K. Acute and Preventative Treatment of Episodic Migraine. In: Diamond S, ed. Headache and Migraine Biology and Management. Academic Press, 2015.
                            17. American Headache Society. The American Headache Society Position Statement On Integrating New Migraine Treatments Into Clinical Practice. Headache. 2019 Jan;59(1):1-18. doi: 10.1111/head.13456. Epub 2018 Dec 10.
                            18. Xu R, Insinga RP, Golden W, Hu XH. EuroQol (EQ-5D) Health Utility Scores for Patients with Migraine. Qual Life Res. 2011 May;20(4):601-8. doi: 10.1007/s11136-010-9783-5. Epub 2010 Nov 10.
                            19. Lipton RB, Bigal ME, Diamond M, Freitag F, Reed ML, Stewart WF, AMPP Advisory Group. Migraine Prevalence, Disease Burden, and the Need for Preventive Therapy. Neurology. 2007 Jan 30;68(5):343-9. doi: 10.1212/01.wnl.0000252808.97649.21.