Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
48d35ef
CI: also run the minimum-dependency check on the minimum R version in…
feralaes Nov 14, 2026
fa407d8
CI min-deps: run the minimum-R job on Ubuntu 24.04 without Bioconduct…
feralaes Nov 14, 2026
0bb2e24
Require R (>= 4.1.3): current triangle needs it
feralaes Nov 14, 2026
477a390
Require R (>= 4.2.0) instead of 4.1.3
feralaes Nov 14, 2026
6971364
Merge pull request #249 from DARTH-git/ci-min-r-version
feralaes Nov 14, 2026
ab1bfdb
Bring the installed size under CRAN's 5 MB: xz lazy data, ragg figure…
feralaes Nov 14, 2026
5dd334c
Merge pull request #253 from DARTH-git/installed-size
feralaes Nov 14, 2026
944c707
README.Rmd with a statement of need, feature overview, minimal exampl…
feralaes Nov 14, 2026
abee512
Merge pull request #254 from DARTH-git/217-readme
feralaes Nov 14, 2026
7ba5d62
plot.exp_loss(): label every order of magnitude on the log-scale y axis
feralaes Nov 14, 2026
48a2234
README: the CEAF and expected loss curves, with the Value in Health 2…
feralaes Nov 14, 2026
6f745b6
Merge pull request #256 from DARTH-git/elc-log-breaks
feralaes Nov 14, 2026
cc2bcca
Merge pull request #257 from DARTH-git/readme-elc
feralaes Nov 14, 2026
a3de8d5
Add the dampack hex logo, favicons, and the scripts that build them f…
feralaes Nov 14, 2026
b80b9e6
Merge pull request #258 from DARTH-git/logo
feralaes Nov 14, 2026
c6ab588
README: promote the regression-metamodel EVPPI and Gaussian-approxima…
feralaes Nov 14, 2026
a1f3d64
Merge pull request #259 from DARTH-git/readme-voi
feralaes Nov 17, 2026
d6ce207
Merge remote-tracking branch 'origin/main' into cers-ref
feralaes Nov 17, 2026
48e032d
Keep calculate_icers() fully incremental; add calculate_cers_ref() fo…
feralaes Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@
^codecov\.yml$
^LICENSE\.md$
^CODE_OF_CONDUCT\.md$
^README\.Rmd$
^logo$
27 changes: 25 additions & 2 deletions .github/workflows/check-min-deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# Runs R CMD check with the *minimum* versions of the dependencies declared in DESCRIPTION
# (for example ggplot2 (>= 3.5.0) installs ggplot2 3.5.0), so that a lower bound that is too low
# fails CI instead of failing for users with older packages (as with #198).
# It runs twice: on the current R release, and on the minimum R version in DESCRIPTION
# (`R (>= x.y)`), so that the R bound is tested too.
on:
push:
branches: [main]
Expand All @@ -19,18 +21,39 @@ concurrency:

jobs:
min-deps:
runs-on: ubuntu-latest
name: minimum dependency versions
runs-on: ${{ matrix.os }}
name: minimum dependency versions (R ${{ matrix.r }})
strategy:
fail-fast: false
matrix:
include:
- {r: 'release', os: ubuntu-latest}
# An old R needs an Ubuntu release that the package manager still builds binaries
# for, and the Bioconductor mirrors of that era are gone (dampack uses none).
- {r: 'minimum', os: ubuntu-24.04}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
PKG_USE_BIOCONDUCTOR: false
steps:
- uses: actions/checkout@v6

- uses: r-lib/actions/setup-pandoc@v2

- name: Resolve the R version
id: rver
run: |
if [ "${{ matrix.r }}" = "minimum" ]; then
v=$(grep -oE 'R \(>= *[0-9.]+\)' DESCRIPTION | grep -oE '[0-9.]+')
else
v=release
fi
echo "R version: $v"
echo "version=$v" >> "$GITHUB_OUTPUT"

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ steps.rver.outputs.version }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
Expand Down
6 changes: 4 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ BugReports: https://github.com/DARTH-git/dampack/issues
Encoding: UTF-8
Language: en-US
Depends:
R (>= 4.1.0),
R (>= 4.2.0),
ggplot2 (>= 3.5.0)
Imports:
ellipse,
Expand All @@ -67,8 +67,10 @@ Suggests:
testthat,
knitr,
rmarkdown,
kableExtra
kableExtra,
ragg
LazyData: true
LazyDataCompression: xz
BuildResaveData: no
RoxygenNote: 7.3.2
VignetteBuilder: knitr
Expand Down
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated by roxygen2: do not edit by hand

S3method(plot,ceac)
S3method(plot,cers_ref)
S3method(plot,evpi)
S3method(plot,evppi)
S3method(plot,evsi)
Expand All @@ -10,6 +11,7 @@ S3method(plot,owsa)
S3method(plot,psa)
S3method(plot,twsa)
S3method(predict,metamodel)
S3method(print,cers_ref)
S3method(print,icers)
S3method(print,metamodel)
S3method(print,sa)
Expand All @@ -21,6 +23,8 @@ export(calc_evpi)
export(calc_evppi)
export(calc_evsi)
export(calc_exp_loss)
export(calculate_cers_ref)
export(calculate_cers_ref_psa)
export(calculate_icers)
export(calculate_icers_psa)
export(ceac)
Expand Down
13 changes: 6 additions & 7 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
- `plot.psa()` gains `xtrans` and `ytrans` to put the effectiveness and cost axes on, for example, a log scale. The ellipses are computed on the transformed scale, so they keep their shape instead of breaking where they cross zero; values a log axis cannot show give an informative error (#201).
- Plot arguments are more consistent across methods (#214): `plot.owsa()` and `plot.exp_loss()` take `linewidth` (as in ggplot2); `plot.owsa()` and `plot.twsa()` gain `xlim` and `ylim`, and `owsa_opt_strat()` gains `xlim`; `effect_units` defaults to `"QALYs"` in every plot, and willingness-to-pay labels use its singular ("$/QALY"). The naming rules are recorded in an API style section of CONTRIBUTING.md.
- The currency of a `psa` object now carries through to its analyses: `ceac()`, `calc_exp_loss()`, `calc_evpi()`, `calc_evppi()`, `calc_evsi()`, and `calculate_icers_psa()` keep it, and their `plot()` and `print()` methods use it unless `currency` is given. `plot.ceac()` gains `effect_units` (#203).
- `summary.psa()` gains `ref_str` and `wtp`. With a reference strategy it adds the mean incremental cost and effect and the proportion of PSA samples in each quadrant of the incremental cost-effectiveness plane (`propNE`, `propSE`, `propSW`, `propNW`); with `wtp` it adds the mean NMB and, with a reference, `meanIncNMB` and the proportion of samples that are cost-effective compared with the reference (`propCostEffective`) (#209, #202).
- `calculate_icers_psa()` gains `ref_str`, `wtp`, and `nhb`. With `uncertainty = TRUE` and a reference strategy, it adds 95% intervals for the differences from the reference, computed sample by sample (#209).
- `plot.icers()` gains `ref_str`, which plots the incremental cost-effectiveness plane with the reference strategy at the origin, and `wtp`, which draws a willingness-to-pay line. `plot.psa()` gains `wtp` for the same line, drawn through the reference strategy or, without one, through the least costly strategy. `plot.icers()` uses the currency stored by `calculate_icers()` (#209, #202).
- `calculate_icers()` can compare every strategy with a user-selected reference strategy: with `ref_str = "Standard of care"`, it adds `Inc_Cost_ref`, `Inc_Effect_ref`, `ICER_ref`, and `Status_ref` ("Reference", "Dominant", "Dominated", "More costly, more effective", "Less costly, less effective", or "Equivalent"). The frontier-based results are unchanged, and without `ref_str` no columns are added (#209).
- `calculate_icers()` gains `wtp`, which adds the net monetary benefit (`NMB`, and `Inc_NMB_ref` with a reference strategy), and `nhb = TRUE`, which also adds the net health benefit (`NHB`, `Inc_NHB_ref`) (#200).
- `calculate_icers()` gains `currency`, used by `print.icers()`. `print.icers()` gains `ref`: `"sequential"` (the default) prints the usual table, and `"reference"` or `"both"` print the comparison with the reference strategy (#209).
- New `calculate_cers_ref()` and `calculate_cers_ref_psa()` compare every strategy with a reference strategy chosen by the user, such as the standard of care: the difference in cost and effect from the reference, the cost-effectiveness ratio (CER) of that difference, and the status relative to the reference ("Dominant", "Dominated", "More costly, more effective", "Less costly, less effective", or "Equivalent"). With `wtp`, they add the net monetary benefit and its difference from the reference. From a PSA, `uncertainty = TRUE` adds 95% intervals for the differences and the proportion of samples in each quadrant of the incremental cost-effectiveness plane and, with `wtp`, the proportion that is cost-effective compared with the reference. `plot()` draws the incremental plane centered at the reference, with a segment to each strategy and an optional willingness-to-pay line. These comparisons complement, and do not replace, the fully incremental analysis of `calculate_icers()`, which HTA guidelines require; the documentation cites the NICE, CDA-AMC, and Zorginstituut Nederland guidelines (#209).
- `plot.icers()` gains `incremental = TRUE`, which plots the incremental cost-effectiveness plane with the first non-dominated strategy (the least costly strategy on the frontier) at the origin, and `wtp`, which draws a willingness-to-pay line through that strategy. `plot.psa()` gains `wtp` for the same line, drawn through the reference strategy or, without one, through the least costly strategy (#209, #202).
- `calculate_icers()` and `calculate_icers_psa()` gain `wtp`, which adds the net monetary benefit (`NMB`) of each strategy, and `nhb = TRUE`, which also adds the net health benefit (`NHB`) (#200).
- `calculate_icers()` gains `currency`, which `print.icers()` and `plot.icers()` use (#203).
- `print.icers()` prints a formatted ICER table, with options for the currency symbol and the number of digits (#184, #171).
- `plot.psa()` gains a `ref_str` argument that plots the PSA on the incremental cost-effectiveness plane relative to a chosen reference strategy (#188).
- Plotting functions now default to an accessible, colorblind-friendly palette (`col = "access"`, based on viridis). The previous palettes remain available as `col = "full"` and `col = "bw"`.
Expand All @@ -28,13 +26,14 @@

- Strategy names are now kept exactly as provided in `make_psa_obj()`, `create_dsa_oneway()`, `create_dsa_twoway()`, and the objects built from them, so names such as "Standard of care" appear unchanged in tables and plot legends. Previously they were converted with `make.names()` (to `Standard.of.care`) with a warning. Code that refers to the converted names must use the original ones, for example `psa$cost[["Standard of care"]]` instead of `psa$cost$Standard.of.care`. Strategy names must be unique and not missing or empty, and a wrong number of names now gives an informative error (#208).
- `summary.ceac()` renames its third output column from `cost_eff_strat` to `optimal_strategy`. Code that refers to the old column name with `$cost_eff_strat` must be updated (#173).
- dampack now requires R 4.1.0 or later, the minimum required by current versions of ggplot2.
- dampack now requires R 4.2.0 or later. Current versions of its dependencies need at least R 4.1.3 (triangle), and CRAN only accepts R bounds of the form x.y.0.
- dampack now requires ggplot2 3.5.0 or later and scales 1.3.0 or later, for ggplot2's `transform` argument and `scales::new_transform()` (#211).

## Bug fixes

- EVPPI and EVSI computed from net health benefit (`outcome = "nhb"`, the default of `calc_evsi()`) are in health units, and their plots are now labeled with `effect_units` (e.g., "EVSI (QALY)") instead of a currency (#203).
- `plot.psa(ref_str = )` now works when there are only two strategies; it used to fail with "'dims' cannot be of length 0" (#209).
- `plot.exp_loss()` with its default log-scale y axis (`log_y = TRUE`) now labels every order of magnitude. Its evenly spaced default breaks used to bunch up at the top of the log axis and leave the lower curves without any labels.
- The `hund_strat` help page now describes the data (simulated costs and QALYs for 100 hypothetical strategies) and its columns, with an example. Typos in several help pages are fixed (#219).
- `plot.psa(center = FALSE)` no longer warns "No shared levels found between `names(values)` of the manual scale and the data's fill values" when it is drawn. The fill scale is now added only when the center points that use it are.
- `plot.owsa(col = "bw")` now draws each strategy with its own line type; all strategies used to share one line type and could not be told apart (#176).
Expand Down
Loading
Loading