Skip to content

wnpmle

0.1.3Package record

Weighted NPMLE for Recurrent Events with a Competing Terminal Event

0packages depend
1.2Kdownloads / year
43.1%test coverage
13/13flavors OK

Overview

About

Provides regression modeling and prediction for the marginal mean of recurrent events in the presence of a competing terminal event using the weighted nonparametric maximum likelihood estimator (wNPMLE) of Bellach and Kosorok (2026) doi:10.48550/arXiv.2605.25934. Two classes of transformation models are implemented: Box-Cox transformation models and logarithmic transformation models. These extend the proportional means model of Ghosh and Lin (2002) doi:10.17615/pt0g-y207 and the transformation model framework of Zeng and Lin (2006) doi:10.1093/biomet/93.3.627. Parameter estimation is performed using automatic differentiation through the Template Model Builder (TMB) framework. Standard errors are computed using sandwich variance estimators that account for estimation of the inverse-probability censoring weights following Bellach, Kosorok, Rüschendorf and Fine (2019) doi:10.1080/01621459.2017.1401540.

Changes in 0.1.3
  • The censoring-corrected sandwich variance (se = "sandwich_adj", the default) now follows the formula in Bellach and Kosorok (2026, Appendix B.3) exactly. Two coding issues in the correction term were fixed: the correction is now subtracted from the subject-wise scores (which are on the negative log-likelihood scale), and two internal matrices are now filled in the right order. In the settings checked, the effect on the standard errors was in the fourth decimal place or smaller.
  • Subject-wise scores and the censoring correction are now computed with TMB (new templates in inst/tmb/), which makes se = "sandwich" and se = "sandwich_adj" much faster for larger data sets.
  • Compiled TMB templates are now kept between R sessions (in tools::R_user_dir("wnpmle", "cache")), so they are compiled only once per installed version instead of once per session. A different folder can be set with options(wnpmle.cache_dir = ...) or the environment variable WNPMLE_CACHE_DIR, e.g. to share one compiled copy between cluster jobs.
Show all changes in 0.1.3Hide the rest of the changes in 0.1.3
  • The meat of the sandwich is computed with crossprod(), which uses much less memory.
  • New example data readmission_prep(): hospital readmissions of 403 colorectal cancer patients with death as terminal event (Gonzalez et al., 2005; copy of the readmission data from frailtypack). The vignette now uses these data as its main example, including model selection with plot_loglik(). The bladder quick start now compares the Ghosh-Lin fit with the estimates reported by Ghosh and Lin (2002).
  • predict() now handles factor covariates (same coding as in the fit), and uses the correct limit log(1 + x) for the Box-Cox model at rho = 0.
  • summary() now returns an object that is printed once (before, printing the result of summary() showed the coefficients twice).
  • plot_loglik(): wider default PDF (width, height arguments), titles no longer overlap, and the points rho = 1 and r = 1 are labelled.
  • Documentation: "sandwich_adj" is listed as the default for se; references now cite the arXiv preprint of Bellach and Kosorok (2026) with its DOI, and DOIs were added to all references where available.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 12.8 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK7 OK2026-06-19
Advisories

none known

Documentation

In release 0.1.3
READMEYes · 413 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 0.1.3Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
15 (1 internal)includes a package overview page
Examples that run
40%2 run in a plain check · 3 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
100%
Documented parameters
95%
Return-value docs
100%
Help pages citing references
27%

Downloads

1.2K
CRAN downloads in the past year
Rank #15,327 · ~3/day · ~97/mo
Daily download trend is not available in this view yet.
29630 days
80290 days
1.2K1 year
Compare downloads with other packages →
Also on21 r2u2 autocran

Repository

0Stars
0Forks
0Open issues
0Open PRs
1Releases
74Commits
1Commit identities
74 commits · Last activity 2026-10-18
Responsiveness
not measured

Releases over time

2026-06-20 · 12026-07-07 · 1
PracticesBeta

3 development-tooling and community-health practices detected across 2 families in the upstream repository

Checks run against github.com/abellach/wnpmle on 2026-10-21.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux

Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)

Installing wnpmle adds 3 packages (3 with compiled code, 4.2 MB of source tarballs). Heaviest: Rcpp 1.8 MB, RcppEigen 1.7 MB, TMB 763 KB.

Depends (1)
R >= 4.1.0
Imports (8)
TMBsurvivalmethodsMASSgraphicsgrDevicestoolsutils
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 0.1.2 (2026)
Releases (2)

Pick two releases to compare their code metrics.

  • 0.1.3Latest
    record
    2026-10-08 · current release · diff ↗ ·
    added 1 export
    readmission_prep
    ·
    listed once in CRAN's queue
    Seen in one reading of CRAN's incoming queue, at 2026-10-08 20:25 UTC, so it stayed less than the time between readings.
  • 0.1.2
    record
    2026-06-18
  • R
    R 4.6.0 released · 2026-04-24
Across CRAN, the median accepted release of the past year spent 26 hours in the queue, 90% under 11 days.How queue time is measured

Package metadata

First published
2026-06-18
Total releases
2 / 1 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 4.1.0
Download size
138 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("wnpmle")
Bellach, A. (2026). wnpmle: Weighted NPMLE for Recurrent Events with a Competing Terminal Event (Version 0.1.3) [Computer software]. https://doi.org/10.32614/CRAN.package.wnpmle

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for wnpmle version 0.1.3 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy