Random Generation of Survival Data
Overview
Random generation of survival data from a wide range of regression models, including accelerated failure time (AFT), proportional hazards (PH), proportional odds (PO), accelerated hazard (AH), Yang and Prentice (YP), and extended hazard (EH) models. The package 'rsurv' also stands out by its ability to generate survival data from an unlimited number of baseline distributions provided that an implementation of the quantile function of the chosen baseline distribution is available in R. Another nice feature of the package 'rsurv' lies in the fact that linear predictors are specified via a formula-based approach, facilitating the inclusion of categorical variables and interaction terms. The functions implemented in the package 'rsurv' can also be employed to simulate survival data with more complex structures, such as survival data with different types of censoring mechanisms, survival data with cure fraction, survival data with random effects (frailties), multivariate survival data, and competing risks survival data. Details about the R package 'rsurv' can be found in Demarqui (2024) doi:10.48550/arXiv.2406.01750.
- dplyr package has been moved from Depends to Imports field;
- package argument has been added to the function qsurv() to ensure that the right function from the right package is found depending on the search path;
- Function inv_pgf() was reimplemented to allow the use of the stats::poisson() function in the the incidence argument.
- the r*reg() functions now make sure that there is always a baseline distribution, like in the function survival::coxph().
From NEWS.md in the release
Install
Health
NOTEDESCRIPTION meta-informationr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64
r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-oldrel-macos-arm64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64
Missing dependency on R >= 4.1.0 because package code uses the pipe
|> or function shorthand \(...) syntax added in R 4.1.0.
File(s) using such syntax:
‘lp.Rd’r-devel-windows-x86_64, r-oldrel-windows-x86_64, r-release-windows-x86_64
Missing dependency on R >= 4.1.0 because package code uses the pipe
|> or function shorthand \(...) syntax added in R 4.1.0.
File(s) using such syntax:
'lp.Rd'- NOTE1 OK, 12 NOTE2026-07-29
- ERROR1 OK, 11 NOTE, 1 ERROR2026-07-27
- NOTE1 OK, 12 NOTE2026-06-09
- ERROR1 OK, 11 NOTE, 1 ERROR2026-06-08
- NOTE4 OK, 10 NOTE2026-04-16
Show 4 earlier changesHide 4 earlier changes
- ERROR3 OK, 10 NOTE, 1 ERROR2026-04-15
- NOTE4 OK, 10 NOTE2026-03-30
- ERROR4 OK, 9 NOTE, 1 ERROR2026-03-28
- NOTE4 OK, 10 NOTE2026-03-10
Documentation
- Help pages
- 14includes a package overview page
- Examples that run
- 100%8 run in a plain check
- Exported functions with examples
- 62%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 7% with a bibliography file
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 28
- Median days to close, 50 most recently updated closed PRs
- 0
8 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/fndemarqui/rsurv 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-01-23 · The repository has a site deploy workflow
pkgdown site last built 2026-01-23
This repository shows signs of AI coding tools.
- GitHub Copilotfirst seen 2026-01-20Pull request: opened by its own accountCommits: 2 by its own account
Dependencies
Installing rsurv adds 66 packages (34 with compiled code, 60 MB of source tarballs). Heaviest: BH 14 MB, stringi 11 MB, ggplot2 6.0 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 0.0.2Latest
- 0.0.12024-06-06
- RR 4.4.0 released · 2024-04-24
Package metadata
- First published
- 2024-06-06
- Total releases
- 2 / 2 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 3.4.0
- Download size
- 56 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("rsurv")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.
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.