Evaluate Partitioned Survival and State Transition Models
Overview
Fits and evaluates three-state partitioned survival analyses (PartSAs) and Markov models (clock forward or clock reset) to progression and overall survival data typically collected in oncology clinical trials. These model structures are typically considered in cost-effectiveness modeling in advanced/metastatic cancer indications. Muston (2024). "Informing structural assumptions for three state oncology cost-effectiveness models through model efficiency and fit". Applied Health Economics and Health Policy.
- Updated
create_dummydata("pharmaonc")for breaking changes from new version ofpharmaverseadam - Fix bug in
constrain_survprob()with thanks to @xm2325 - Updated author email address
From NEWS.md in the release
Install
Health
ERRORre-building of vignette outputsr-devel-linux-x86_64-debian-gcc
Error(s) in re-building vignettes:
...
--- re-building ‘example.Rmd’ using rmarkdown
Quitting from example.Rmd:113-124 [find_bestfit]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/purrr_error_indexed>
Error in `purrr::map_chr()`:
ℹ In index: 1.
Caused by error:
! Result must be length 1, not 0.
---
Backtrace:
▆
1. └─psm3mkv::find_bestfit(allfits_spl$ppd, "aic")
2. └─purrr::map_chr(fittable$id, ~reglist[[.x]]$result$dlist$name)
3. └─purrr:::map_("character", .x, .f, ..., .progress = .progress)
4. ├─purrr:::with_indexed_errors(...)
5. │ └─base::withCallingHandlers(...)
6. └─purrr:::call_with_cleanup(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'example.Rmd' failed with diagnostics:
ℹ In index: 1.
Caused by error:
! Result must be length 1, not 0.
--- failed re-building ‘example.Rmd’
--- re-building ‘mortality-adjustments.Rmd’ using rmarkdown
[WARNING] Deprecated: --mathjax. Use --math-method=mathjax[:URL] instead.
--- finished re-building ‘mortality-adjustments.Rmd’
SUMMARY: processing the following file failed:
‘example.Rmd’
Error: Vignette re-building failed.
Execution haltedERRORtestsr-devel-linux-x86_64-debian-gcc
Running ‘testthat.R’ [24s/30s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/tests.html
> # * https://testthat.r-lib.org/reference/test_package.html#special-files
>
> # Sys.setenv("R_TESTS" = "")
> library(testthat)
> library(psm3mkv)
>
> test_check("psm3mkv")
Saving _problems/test-basics-33.R
Saving _problems/test-fitting-spl-27.R
Saving _problems/test-lhoods-101.R
[ FAIL 3 | WARN 0 | SKIP 1 | PASS 216 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-discrmd.R:4:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-basics.R:29:1'): (code run outside of `test_that()`) ───────────
...[truncated]...
local) `<fn>`(`<sbscOOBE>`)
17. └─cli::cli_abort(...)
18. └─rlang::abort(...)
── Error ('test-lhoods.R:101:1'): (code run outside of `test_that()`) ──────────
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map_chr(fittable$id, ~reglist[[.x]]$result$dlist$name)`: i In index: 1.
Caused by error:
! Result must be length 1, not 0.
Backtrace:
▆
1. ├─psm3mkv::find_bestfit(af2$ppd, "aic") at test-lhoods.R:101:1
2. │ └─purrr::map_chr(fittable$id, ~reglist[[.x]]$result$dlist$name)
3. │ └─purrr:::map_("character", .x, .f, ..., .progress = .progress)
4. │ ├─purrr:::with_indexed_errors(...)
5. │ │ └─base::withCallingHandlers(...)
6. │ └─purrr:::call_with_cleanup(...)
7. └─base::.handleSimpleError(...)
8. └─purrr (local) h(simpleError(msg, call))
9. └─cli::cli_abort(...)
10. └─rlang::abort(...)
[ FAIL 3 | WARN 0 | SKIP 1 | PASS 216 ]
Error:
! Test failures.
Execution halted- ERROR12 OK, 1 ERROR2026-10-24
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
Show 1 earlier changeHide 1 earlier change
- OK14 OK2026-03-10
Documentation
- Help pages
- 28 (1 internal)includes a package overview page
- Examples that run
- 37%10 run in a plain check · 17 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 34
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
9 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/merck/psm3mkv on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-07-10 · The repository has a site deploy workflow
pkgdown site last built 2026-07-10
Show all practicesHide 1 practice
Dependencies
Installing psm3mkv adds 73 packages (40 with compiled code, 56 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 0.3.3Latest
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 0.3.2
- 0.3.12024-05-07
- RR 4.4.0 released · 2024-04-24
Package metadata
- First published
- 2024-05-07
- Total releases
- 3 / 2 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 503 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("psm3mkv")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.1007/s40258-024-00884-2.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.