Skip to content

simsurv

Simulate Survival Data

v1.0.1 · Jan 22, 2026 · GPL (>= 3) | file LICENSE

Description

Simulate survival times from standard parametric survival distributions (exponential, Weibull, Gompertz), 2-component mixture distributions, or a user-defined hazard, log hazard, cumulative hazard, or log cumulative hazard function. Baseline covariates can be included under a proportional hazards assumption. Time dependent effects (i.e. non-proportional hazards) can be included by interacting covariates with linear time or a user-defined function of time. Clustered event times are also accommodated. The 2-component mixture distributions can allow for a variety of flexible baseline hazard functions reflecting those seen in practice. If the user wishes to provide a user-defined hazard or log hazard function then this is possible, and the resulting cumulative hazard function does not need to have a closed-form solution. For details see the supporting paper <doi:10.18637/jss.v097.i03>. Note that this package is modelled on the 'survsim' package available in the 'Stata' software (see Crowther and Lambert (2012) <https://www.stata-journal.com/sjpdf.html?articlenum=st0275> or Crowther and Lambert (2013) <doi:10.1002/sim.5823>).

Downloads

1K

Last 30 days

3773rd

3.4K

Last 90 days

19K

Last year

Trend: -6.6% (30d vs prior 30d)

CRAN Check Status

14 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Reverse Dependencies (6)

imports

Dependency Network

Dependencies Reverse dependencies pacheck psborrow2 BayesSurvival KMunicate pmcalibration smdi simsurv

Version History

new 1.0.1 Mar 10, 2026
updated 1.0.1 ← 1.0.0 diff Jan 21, 2026
updated 1.0.0 ← 0.2.3 diff Jan 12, 2021
updated 0.2.3 ← 0.2.2 diff Jan 31, 2019
updated 0.2.2 ← 0.2.0 diff May 17, 2018
updated 0.2.0 ← 0.1.0 diff Mar 5, 2018
new 0.1.0 Jul 26, 2017