Present the CEA against a user-selected reference strategy (`ref_str`)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 38/100
Línea de trabajo
Start with calculate_icers() in R/icers.R and the existing plot.psa(ref_str) implementation in R/psa.R; review the listed dependencies (#208, #183, and #178) before changing these entry points. Add tests for the hand-calculated cases, default-output snapshot, and strategy-count edge cases described in the acceptance criteria. Done means reference comparisons and optional net benefits work across the listed functions while default sequential results remain unchanged, and basic_cea documents the feature.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Suggested owners: Fernando Alarid-Escudero and Eline Krijkamp (methods), with Matthew Kaufmann (who built plot.psa(ref_str)) · Plan: Phase 3, steps 1–6
Goal
Let users report results against a fixed comparator, e.g. "Standard of care", alongside the default frontier-based analysis. Many HTA reports and journals ask for this.
The sequential frontier ICERs stay the default and remain the decision-relevant result. When ref_str = NULL, output is identical to v1.0.x.
History:
- #72 (closed 2019) removed an earlier
ref_stratargument fromcalculate_icers(). The roxygen still describes it:R/icers.R:17-18, "With the default (NULL), there is no reference strategy…". That stale text is also part of #178. - Why the 2019 version was removed matters for this design. It (commit e7eef8e, removed in 6649b66) moved the reference strategy to the top of the cost-sorted table before the dominance loop, and relabeled its status as
"ref". The dominance loop assumes strategies are sorted by ascending cost. So whenever the reference was not the cheapest strategy, it could mislabel dominated and extendedly dominated strategies. The new design avoids this by never changing the frontier calculation: the comparisons against the reference are separate columns computed after the frontier. - #188 (closed Sep 2026) added
ref_strtoplot.psa()only.
Depends on: #208, #183, #178. Delivers: #200 (NMB/iNMB) and #202 (WTP line).
Scope
calculate_icers(cost, effect, strategies, ref_str = NULL, wtp = NULL, nhb = FALSE, currency = "$")(R/icers.R:59):- Keep
Status,Inc_Cost,Inc_EffectandICERunchanged. With the defaultref_str = NULLandwtp = NULL, the output is identical to v1.0.x. - Reference columns are added only when
ref_stris given; otherwise they are irrelevant and left out. Check thatref_stris one ofstrategies.Inc_Cost_ref,Inc_Effect_ref: cost and effect of each strategy minus those of the reference.ICER_ref: numeric.NAwhere a ratio is not meaningful: for the reference itself, and for strategies that dominate or are dominated by the reference.Status_ref: a categorical description of each strategy versus the reference. Proposed labels:"Reference""Dominant": less costly and at least as effective"Dominated": more costly and no more effective"More costly, more effective""Less costly, less effective"
- Net benefit when
wtpis given:NMBby default (most commonly used), plusiNMB_refwhenref_stris set. This closes #200.NHB(andiNHB_refwithref_str) only as an option, for examplenhb = TRUE, since it is less commonly used.
- Store
attr(x, "ref_str"),attr(x, "wtp")and the currency on the object.
- Keep
print.icers(x, ref = c("sequential", "reference", "both"), ...)(R/icers.R:411): uses the object's currency andeffect_units.plot.icers(x, ref_str = , wtp = ): incremental CE plane with the origin at the reference, and an optional WTP line (#202).calculate_icers_psa(psa, ref_str = , wtp = )andsummary.psa(psa, ref_str = ): mean incremental cost, effect and iNMB versus the reference, with uncertainty intervals.plot.psa(ref_str = )(R/psa.R:150-290):- Fix the 2-strategy bug at
R/psa.R:244:df[, !(names(df) %in% ref_str)]drops to a vector withoutdrop = FALSE. Reproduced:plot(psa_2strat, ref_str = "A")warns "STATS is longer than the extent of 'dim(x)[MARGIN]'" and the incremental values are wrong. - Add the optional WTP line (#202) and a quadrant summary.
- Fix the 2-strategy bug at
- One internal
check_ref_str()helper and a shared@param ref_strroxygen template, used through@inheritParams.
Decided (Eline Krijkamp, Nov 12, 2026):
- Reference columns appear only when
ref_stris given. ICER_refstays numeric, withNAwhere it is not meaningful.- A categorical
Status_refcolumn describes each strategy versus the reference. - With
wtp,NMB/iNMB_refby default;NHB/iNHB_refonly as an option.
Also confirmed (DARTH group, Nov 12, 2026):
- The
Status_reflabels above. - The NHB option is named
nhb = TRUE. print.icers()shows the sequential table by default whenref_stris set, withref = "reference"or"both"to show the comparison.
Acceptance
- Without
ref_str, no reference columns are present; withoutwtp, no net-benefit columns are present. - Hand-calculated values match for
hund_stratand for a 3-strategy toy case in three situations: reference on the frontier, reference dominated, and reference the most expensive strategy. ref_str = NULLoutput is identical to a v1.0.x golden snapshot.- 2-strategy and single-strategy edge cases pass.
- Names with spaces work (#208).
basic_ceagets a section "Presenting results against a reference strategy" with references.
- Lenguaje dominante
- R
- Estrellas
- 43
- Forks
- 14
- Merge medio
- 4 h 44 min
- PR fusionados (30 d)
- 15
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de DARTH-git/dampack
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Release dampack 1.1.0 to CRANAbiertorelease
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
Los mantenedores suelen responder en 1 día
-
documentation release
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
Los mantenedores suelen responder en 1 día
Todos los issues de DARTH-git/dampack
Issues similares
-
documentation priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Pascal-Kueng/dyadMLM#179 ·
Los mantenedores suelen responder en 1 día
-
Consider changesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
OHDSI/OmopSketch#618 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
bug exec:agent status:fix-merged
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ichirio/rtfreporter#1046 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día