Cost-Effectiveness with QALY

    Over the last twenty years, the QALY has become one of the most common ways to measure the value of a health outcome. QALY stands for Quality Adjusted Life Years. It puts two things into one number: how long someone lives, and how good that life is. With one number, you can compare two treatments on the same scale. You no longer have to argue separately about extra years and about how the patient feels during those years.

    Here is a simple way to picture it. One year lived in perfect health is worth 1 QALY. One year lived at half your normal quality of life is worth about 0.5 QALY. So a treatment that adds years of good health scores higher than one that adds the same number of years spent feeling unwell.

    The idea behind the formula

    There is more than one way to combine length of life and quality of life. One approach treats a QALY like a complex number. Length of life is the real part. Quality of life (the utility) is the imaginary part. The thinking is that utility is not something you can count or touch the way you count years, so the two parts are not simply multiplied. Instead you take the magnitude of the pair. In plain terms, you square each part, add them, and take the square root:

    QALY = square root of (length of life squared + utility squared)

    QALY formula written as the square root of (1 squared plus Utility squared), divided by 1.4142, then multiplied by Time.
    QALY formula written as the square root of (1 squared plus Utility squared), divided by 1.4142, then multiplied by Time.

    If you want the full reasoning behind this formula, it is laid out in this paper: Problems and solutions in calculating quality-adjusted life years (QALYs).

    You do not have to use the complex-number version. There is also the more traditional formula, which is the one most people learn first:

    QALY = utility × length of life

    This is the simple version. Say a treatment gives 4 years of life at a utility of 0.7. The traditional formula gives 4 × 0.7 = 2.8 QALYs. Both formulas are in the software, so you can pick whichever one your study or your guidelines ask for.

    Traditional QALY formula written as Utility multiplied by Time, the simpler alternative used in many decision tree analyses.
    Traditional QALY formula written as Utility multiplied by Time, the simpler alternative used in many decision tree analyses.

    Calculating QALYs in the SpiceLogic Decision Tree software

    In the SpiceLogic Decision Tree software, you can set up your payoff so that effectiveness is measured in QALYs. When you do, you pick which of the two formulas the software uses: the traditional utility × length of life, or the complex-number version above. You choose once, and the software uses that same formula everywhere in your tree. So your whole model stays consistent, and you do not have to set the method again at each node.

    QALY formula selector in the Effectiveness criterion editor, offering both the complex-number formula and the Utility times Time formula.
    QALY formula selector in the Effectiveness criterion editor, offering both the complex-number formula and the Utility times Time formula.

    Once you choose QALY as your effectiveness measure, the payoff editor gives you two fields to fill in for each outcome: the Utility value and the Time (length of life). You type those two numbers, and the software works out the QALY for you with the formula you picked. You never do the math by hand. For example, if a recovery outcome has a utility of 0.8 and lasts 5 years, you just enter 0.8 and 5, and the QALY shows up on its own.

    Payoff editor configured for QALY, with separate input fields for Utility value and Time so the program computes the QALY automatically.
    Payoff editor configured for QALY, with separate input fields for Utility value and Time so the program computes the QALY automatically.

    Sometimes you already have a QALY figure worked out. Or you would rather track one number of your own instead of typing Utility and Time apart. For that, the Effectiveness editor has a third option: "A single custom variable".

    Pick that option and you can name the variable yourself and set its range with a Minimum and a Maximum value. After that, you type one number for each outcome, and that number is used as your effectiveness value directly. This is handy when your data already comes as finished QALY scores from a published study, so you just enter them as they are.

    Effectiveness Criterion tab with A single custom variable selected, configured here as Maximize Life-years ranging from 0 to 100.
    Effectiveness Criterion tab with A single custom variable selected, configured here as Maximize Life-years ranging from 0 to 100.

    For example, say you want to type the QALY in yourself, and you want every value to fall between 0 and 1. You would set it up like this: give the variable a name (such as QALY), set the Minimum to 0, and set the Maximum to 1. The range keeps you honest. If you slip and type 1.5, it falls outside the bounds you set, so you catch the mistake early.

    Custom variable definition for direct QALY entry with name set and range bounded between 0 and 1.
    Custom variable definition for direct QALY entry with name set and range bounded between 0 and 1.

    After that, your Decision Tree lets you type the QALY straight in as one number for each outcome. There are no Utility and Time fields to fill in. The value you enter is used exactly as you typed it, with no extra calculation behind it.

    Payoff editor on a decision tree node accepting a direct QALY value when the single custom variable option was chosen.
    Payoff editor on a decision tree node accepting a direct QALY value when the single custom variable option was chosen.

    A worked example

    Suppose you are weighing two treatment options. The first gives you 4 years of life at a utility of 0.7. The second gives you 7 years of life at a utility of 0.4.

    Which option is better?

    The answer is not obvious. The first option means fewer years but better quality. The second means more years but lower quality. QALYs let you compare them on one scale. Here is how to set it up in the software.

    Start the Decision Tree software and create two action nodes, one for each treatment option.

    Two-action decision tree (treatment comparison) with the payoff button highlighted to start the QALY worked example.
    Two-action decision tree (treatment comparison) with the payoff button highlighted to start the QALY worked example.

    When the setup window appears, click the second button, "Cost-Effectiveness Analysis".

    Payoff type window with the second button Cost-Effectiveness Analysis selected to configure QALY-based effectiveness.
    Payoff type window with the second button Cost-Effectiveness Analysis selected to configure QALY-based effectiveness.

    Next, select the first radio button, "Maximize QALY", and pick the formula you want to use, as shown here.

    Cost-Effectiveness criterion editor with Maximize QALY chosen and the square-root-of-(1 + Utility squared) over 1.4142 times Time formula selected.
    Cost-Effectiveness criterion editor with Maximize QALY chosen and the square-root-of-(1 + Utility squared) over 1.4142 times Time formula selected.

    Click Proceed, and the software takes you to the decision tree, where you can fill in the Utility value and the Time for each option. For the first option, set Utility = 0.7 and Time = 4 years. For the second option, set Utility = 0.4 and Time = 7 years.

    As you type those numbers, the software works out the QALY with the formula you chose and shows it right there. You can see at a glance which option comes out ahead, and you can try other numbers to see how the answer changes.

    Treatment A payoff editor showing Utility 0.7 and Time 4 Years with computed QALY of 3.45 on the tree, alongside the Cost-Effectiveness Plane recommending Treatment B (QALY 5.33).
    Treatment A payoff editor showing Utility 0.7 and Time 4 Years with computed QALY of 3.45 on the tree, alongside the Cost-Effectiveness Plane recommending Treatment B (QALY 5.33).

    That is the whole idea. You enter the numbers you have, the software does the QALY math, and you read off which option scores higher. Once your tree is set up, you can change a utility or a time and watch the result update, so it is easy to test a few what-if cases before you decide.

    Last updated on Feb 13, 2022