aphp / heemod

Markov Models for Health Economic Evaluations
https://aphp.github.io/heemod/
GNU General Public License v3.0
11 stars 1 forks source link

OS and PFS curves crossing (negative state occupancy) #7

Closed william-rawlinson closed 1 year ago

william-rawlinson commented 1 year ago

It would be great to have a work around for when PFS and OS curves cross when using heemod for a partitioned survival model. Currently, this causes an error 'Error in compute_counts.eval_part_surv(x = transition, init = init, inflow = inflow): Negative counts in partitioned survival model, at cycles: 1, 2, etc.'

Despite best efforts to parametrize IPD, sometimes, the best fit parametrization of the PFS and OS data will cross. If modelling in Excel, you would solve this problem by calculating occupancy for the progressed disease state as max(0,overall survival - progression free survival). This is equivalent to setting PFS to equal OS when the PFS curve is above the OS curve.

It would be great to have an option with heemod to switch to this workaround. This could produce a warning that negative state occupancies were produced and this workaround had to be used. A similar warning system is in place for the hesim package. It looks like the compute_counts.eval_part_surv function could be adapted to achieve this.

KZARCA commented 1 year ago

Hi William, would it be possible for you to propose a pull request? Best