format_icer_table

report.format_icer_table(source, *, effect=None, interval=0.95, digits=None)

Render the ICER table for reading, with rounded numbers and intervals.

Parameters

Name Type Description Default
source Outcomes | pd.DataFrame Same input as heormodel.cea.icer_table: a probabilistic Outcomes or a per-intervention mean table. required
effect str | None Effect column name, passed through to icer_table. None
interval float | None Central probability for the uncertainty interval, passed through to icer_table. With a probabilistic Outcomes of more than one iteration, each estimate is written point (low, high); otherwise only the point estimate is shown. 0.95
digits int | Mapping[str, int] | None Decimal places. An integer applies to every measure; a mapping from measure name ("cost", "effect", "inc_cost", "inc_effect", "icer") sets them one at a time and falls back to the default for any measure left out. The default rounds costs and the ratio to whole units and effects to two decimals. None

Returns

Name Type Description
pd.DataFrame DataFrame of strings indexed by intervention, sorted by cost, with
pd.DataFrame sentence-case columns Cost, Effect, Incremental cost,
pd.DataFrame Incremental effect, ICER and Status. Cells with no value (the
pd.DataFrame cheapest frontier intervention’s incremental columns, or any dominated
pd.DataFrame intervention’s ICER) are blank.

Example

import pandas as pd from heormodel.report import format_icer_table means = pd.DataFrame( … {“cost”: [0.0, 100.0, 400.0], “effect”: [0.0, 0.5, 1.0]}, … index=[“A”, “B”, “D”], … ) format_icer_table(means).loc[“D”, “ICER”] ‘600’

Back to top