plot_expected_loss
report.plot_expected_loss(loss_df, *, ax=None)Expected loss curves, one per intervention over the willingness-to-pay grid.
The lower envelope of the curves is the expected value of perfect information, so the plot shows the optimal intervention (lowest curve) and the cost of decision uncertainty at each threshold together.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| loss_df | pd.DataFrame | Output of heormodel.cea.expected_loss. |
required |
| ax | Axes | None |
Existing axes to draw on. | None |
Example
import pandas as pd from heormodel.cea import expected_loss from heormodel.models import Outcomes from heormodel.report import plot_expected_loss c = pd.DataFrame({“A”: [0.0, 0.0], “B”: [5.0, 5.0]}) e = pd.DataFrame({“A”: [0.0, 0.0], “B”: [1.0, -1.0]}) curves = expected_loss(Outcomes.from_wide(c, e), wtp=[0.0, 10.0, 20.0]) ax = plot_expected_loss(curves) ax.get_ylabel() ‘Expected loss’