Skip to content

Parameter table prints c_trtB = $12,000; the analysis code and the published results use $13,000 #1

Closed

Description

@conallaque

I've been reproducing published cSTMs in Python to learn the conventions properly, and this tutorial was one of them. The replication matches every published cost, QALY, ICER and dominance verdict exactly — with one parameter I had to take from the code rather than the table.

The parameter table prints the annual cost of treatment B as $12,000. The analysis script uses c_trtB <- 13000. Only $13,000 reproduces the paper's own Table 5:

Strategy B cost ICER
Published (Table 5) $259,100 $72,988
c_trtB = 13000 (the code) $259,100 ✓ $72,988 ✓
c_trtB = 12000 (the table) $249,119 ✗ $66,212 ✗

The same holds in the time-dependent tutorial — published $202,536 / $65,288, reproduced exactly at 13,000 and missed at 12,000.

What makes me think this is a typo rather than a modelling choice I've misread: the PSA distribution printed in the same table row is gamma(86.2, 150.8). A gamma mean is shape × scale, and 86.2 × 150.8 = $12,999 — the code's value, not the $12,000 printed beside it. Treatment A's row is the control and it checks out: gamma(73.5, 163.3) has mean $12,003 against a printed $12,000. One row disagrees with itself; the other doesn't.

One difference between the two papers worth stating precisely: the introductory paper's body text says treatment B "costs $13,000 per year," so that paper contradicts its own table. The time-dependent paper's prose says $12,000, so there the narrative and the table agree with each other and disagree with the code that produced the published results.

This doesn't affect the tutorials' conclusions and it's a small thing. I'm raising it because someone rebuilding the model from the table alone — which is what a reader is invited to do — would miss the published ICER by 9% with no indication of why. That happened to me before I checked the scripts.

Table readings verified against manuscript/cSTM_Tutorial_Intro.tex and cSTM_Tutorial_TimeDep.tex rather than text scraped from a rendered PDF. Full working, with the assertions in both directions: https://github.com/conallaque/heor-model-replication

Thanks for the tutorials — they're the reason I could do this at all.

Activity

  1. ppehli commented on Aug 26, 2026

    @ppehli
  2. feralaes commented on Nov 10, 2026

    @feralaes
    Contributor

    Thank you for this careful report, and for replicating the model independently. You're right: the parameter table (Table 2) has a typo. The correct cost of treatment B is $13,000. That's the value in the article's text, the code, the PSA distribution in the same row (as you noted, gamma(86.2, 150.8) has mean ≈ $13,000) and all the published results.

    The code was already correct, so nothing changes numerically. In #5 we:

    • documented the erratum in manuscript/README.md (we keep the manuscript files as the archival source of the article) and in a callout at the top of the README, so anyone rebuilding the model from the table will find it;
    • added a unit test that checks every PSA distribution is centred on its base-case value, so the base case and the PSA can't drift apart again;
    • acknowledged you in the README and NEWS.

    We'll make the same correction in the time-dependent tutorial, whose parameter table has the same typo. (Its text, like this paper's, says $13,000; only the table is wrong.)

    Thanks again for taking the time to check this so carefully, and for the kind words about the tutorials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions