WAreg: While-Alive Regression for Composite Endpoints with
Cluster-Robust Inference
Provides estimation and inference for while-alive regression models targeting the while-alive loss rate for composite endpoints that include recurrent events and a terminal event. The implementation supports flexible time-varying covariate effects through user-selected time bases, including B-splines, natural splines, M-splines, step functions, truncated linear
bases, interval-local bases, and piecewise polynomials. Inference can be performed using cluster-robust variance estimators for cluster-randomized trials, with subject-level (IID) variance as a special case. The package includes prediction and plotting utilities and K-fold cross-validation for
selecting basis and tuning parameters. Methodology is based on Fang et al. (2025) <doi:10.1093/biostatistics/kxaf047>.
| Version: |
0.1.0 |
| Depends: |
R (≥ 4.1) |
| Imports: |
dplyr, tidyr, tibble, ggplot2, survival, nleqslv, splines, MASS, magrittr, rlang |
| Suggests: |
splines2, testthat (≥ 3.0.0), knitr, rmarkdown |
| Published: |
2026-03-06 |
| DOI: |
10.32614/CRAN.package.WAreg (may not be active yet) |
| Author: |
Xi Fang [aut, cre],
Hajime Uno [aut],
Fan Li [aut] |
| Maintainer: |
Xi Fang <x.fang at yale.edu> |
| BugReports: |
https://github.com/fancy575/WAreg/issues |
| License: |
GPL-3 |
| URL: |
https://github.com/fancy575/WAreg |
| NeedsCompilation: |
no |
| CRAN checks: |
WAreg results |
Documentation:
Downloads:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=WAreg
to link to this page.