Repository navigation
Open
Labels
documentationVignettes, Rd, README, NEWS, paperVignettes, Rd, README, NEWS, paper
Milestone
Description
Suggested owner: Eva Enns (an author and a second reviewer per vignette) · Plan: Phase 4
Goal
Vignettes that teach the methods correctly and build quickly. Fix the errors the audit found.
Scope
- New
vignettes/dampack.Rmd("Get started"): a 5-minute end-to-end example covering ICERs, the PSA object, CEAC/ELC and EVPI. It becomes the pkgdown "Get started" page. - Reading order: Get started →
basic_cea→psa_analysis→voi→psa_generation→dsa_generation. - Every vignette:
- Learning objectives.
- Methods with formulas: dominance, extended dominance, ICER, NMB/NHB, CEAC versus ELC and the frontier, EVPI/EVPPI/EVSI with the metamodel approach.
- Interpretation.
- References from a shared
vignettes/references.bib. set.seed()and DARTH naming in the example code.
- Fix the audit's errors:
basic_cea: says the class is "icer" (it isicers); says "cdiff_psa" (the data ispsa_cdiff); has anicer_difftypo; never showsprint.icersorcalculate_icers_psa.psa_analysis:- The NMB/NHB formula text says "added to" where it should say subtracted.
- The tornado text describes a median split, but the code uses the range min/max.
psa_generation:- Points to the wrong vignette.
- Relies on partial argument matching (
n = 100,effect =). - Says "Effect" where it should say "QALY".
- Ends without any analysis.
dsa_generation:l_twsa_det$owsa_NMBtypo; add the tornado diagram (Add tornado diagram as additional visualization to OWSA vignette #185).voi: wrong help links?make_psa_objectand?calculate_outcomes; says "adjusted r-squared" butlmreports the unadjusted value; cite Strong et al. 2014 in the vignette text.
- Remove the unreferenced
vignettes/icer_cdiff.png(186 KB) andvignettes/cdiff_icers.csv. - Speed: cut the 10,000-sample metamodel runs, or move heavy material to pkgdown-only articles (
vignettes/articles/, build-ignored). - Close Resolve scope of DSA vignettes #147:
dsa_visualizationno longer exists. File a v1.2 issue for a "bring your own DSA data" section.
Acceptance
- All vignettes build from a clean install, without
load_all, in under 2 minutes total. - Each vignette has been reviewed by someone other than its author.
Metadata
Metadata
Assignees
Labels
documentationVignettes, Rd, README, NEWS, paperVignettes, Rd, README, NEWS, paper
Activity
feralaes commentedon Nov 12, 2026
Found while debugging a flaky CI failure (PR #230 adds a seed as a stopgap). In
psa_generation.Rmd, the example model samples the competing transitions out of Sick independently:p_S1H ~ Beta(12, 12)(to Healthy) andp_S1S2 ~ Beta(15, 133)(to Sicker). Their sum can exceed 1 (about 1 in 100,000 samples, so about 1 vignette build in 300). The S1→S1 entry(1 - p_S1D) * (1 - (p_S1H + p_S1S2))is then negative and the model stops with "This is not a valid transition matrix".Since the vignette teaches PSA generation, it may be worth showing the more defensible approach as part of the overhaul. Options:
gen_psa_samp()already supports"dirichlet".This is a content decision, so I've left it for the vignette work.
feralaes commentedon Nov 12, 2026
@evaenns, here is a summary of the v1.1.0 items that are yours, so you can pick them up when you have time. Target: everything merged by the Dec 4 feature freeze (CRAN submission is planned for about Dec 11).
Vignettes (this issue, #216)
basic_cea(from Present the CEA against a user-selected reference strategy (ref_str) #209). The code is done in Compare strategies with a reference in calculate_icers() and print.icers() (#209, #200) #227 and Reference strategy and quadrant shares in summary.psa() and calculate_icers_psa() (#209, #202) #229:calculate_icers(..., ref_str = , wtp = ),print(x, ref = "reference"),plot(x, ref_str = , wtp = ), andsummary(psa, ref_str = , wtp = ). The section should explain when to report sequential versus reference-based ICERs, with references (Neumann et al. 2016; Hunink et al. 2014). Once it's in, Present the CEA against a user-selected reference strategy (ref_str) #209 can close.psa_generation: see my comment above. The Sick → Healthy and Sick → Sicker probabilities are sampled independently and can sum to more than 1. Fix the random seed in the psa_generation vignette (flaky CI) #230 adds a seed as a stopgap; a Dirichlet draw would fix it properly.Two small checks from #205
?cancer_psa_data(R/data_cancer_psa_data.R): please confirm the parameter descriptions (pFailChemo,pDieSurg,muDieCancer, …). They were written from the parameter names.vignettes/psa_analysis.Rmd): the YAML title is "Probabilistic Sensitivity Analysis", but line 7's\VignetteIndexEntry{}still says "Probabilistic Sensitivity Analysis: Analysis". pkgdown warns about the mismatch, so please choose one.Related issues where you're the suggested owner
@examplesfor every exported function, plus Rd fixes.Workflow reminder (details in CONTRIBUTING): one branch per issue from
main, a PR intomainwithCloses #<issue>, and one approving review. The rendered site, including the current vignettes, is at https://darth-git.github.io/dampack/.Release prep for 1.1.0 (#219): smaller tarball, URL and spelling chec…