expected_loss

cea.expected_loss(outcomes, wtp, *, effect=None)

Expected loss curve: mean foregone net benefit per intervention.

In each iteration, an intervention’s loss is the gap between its net monetary benefit and the best intervention’s in that iteration; the curve is the mean loss over iterations at each willingness-to-pay value. The intervention with the lowest expected loss is the optimal choice, and its expected loss equals the expected value of perfect information, so the curves show both the ranking and the cost of decision uncertainty on one money scale.

Parameters

Name Type Description Default
outcomes Outcomes Outcomes from a probabilistic sensitivity analysis. required
wtp ArrayLike | Sequence[float] Grid of willingness-to-pay values. required
effect str | None Effect column (default: the primary effect). None

Returns

Name Type Description
pd.DataFrame DataFrame indexed by wtp with one expected-loss column per
pd.DataFrame intervention.

Example

import pandas as pd from heormodel.models import Outcomes from heormodel.cea import expected_loss c = pd.DataFrame({“A”: [0.0, 0.0], “B”: [10.0, 10.0]}) e = pd.DataFrame({“A”: [0.0, 0.0], “B”: [1.0, -1.0]}) curves = expected_loss(Outcomes.from_wide(c, e), wtp=[10.0]) curves.loc[10.0].round(1).tolist() # loss of A, loss of B [0.0, 10.0]