rstpm2

Smooth Survival Models, Including Generalized Survival Models

CRAN Package

R implementation of generalized survival models (GSMs), smooth accelerated failure time (AFT) models and Markov multi-state models. For the GSMs, g(S(t|x))=eta(t,x) for a link function g, survival S at time t with covariates x and a linear predictor eta(t,x). The main assumption is that the time effect(s) are smooth doi:10.1177/0962280216664760. For fully parametric models with natural splines, this re-implements Stata's 'stpm2' function, which are flexible parametric survival models developed by Royston and colleagues. We have extended the parametric models to include any smooth parametric smoothers for time. We have also extended the model to include any smooth penalized smoothers from the 'mgcv' package, using penalized likelihood. These models include left truncation, right censoring, interval censoring, gamma frailties and normal random effects doi:10.1002/sim.7451, and copulas. For the smooth AFTs, S(t|x) = S_0(t*eta(t,x)), where the baseline survival function S_0(t)=exp(-exp(eta_0(t))) is modelled for natural splines for eta_0, and the time-dependent cumulative acceleration factor eta(t,x)=\int_0^t exp(eta_1(u,x)) du for log acceleration factor eta_1(u,x). The Markov multi-state models allow for a range of models with smooth transitions to predict transition probabilities, length of stay, utilities and costs, with differences, ratios and standardisation.


Documentation


Team


Insights

Last 30 days

This package has been downloaded 8,660 times in the last 30 days. A solid achievement! Enough downloads to get noticed at department meetings. The following heatmap shows the distribution of downloads per day. Yesterday, it was downloaded 310 times.

Sun
Mon
Tue
Wed
Thu
Fri
Sat
0 downloadsFeb 9, 2025
0 downloadsFeb 10, 2025
0 downloadsFeb 11, 2025
0 downloadsFeb 12, 2025
278 downloadsFeb 13, 2025
274 downloadsFeb 14, 2025
182 downloadsFeb 15, 2025
157 downloadsFeb 16, 2025
253 downloadsFeb 17, 2025
279 downloadsFeb 18, 2025
356 downloadsFeb 19, 2025
488 downloadsFeb 20, 2025
384 downloadsFeb 21, 2025
197 downloadsFeb 22, 2025
209 downloadsFeb 23, 2025
329 downloadsFeb 24, 2025
361 downloadsFeb 25, 2025
345 downloadsFeb 26, 2025
340 downloadsFeb 27, 2025
250 downloadsFeb 28, 2025
150 downloadsMar 1, 2025
175 downloadsMar 2, 2025
315 downloadsMar 3, 2025
253 downloadsMar 4, 2025
356 downloadsMar 5, 2025
452 downloadsMar 6, 2025
269 downloadsMar 7, 2025
193 downloadsMar 8, 2025
185 downloadsMar 9, 2025
361 downloadsMar 10, 2025
274 downloadsMar 11, 2025
352 downloadsMar 12, 2025
333 downloadsMar 13, 2025
310 downloadsMar 14, 2025
0 downloadsMar 15, 2025
150
488

The following line graph shows the downloads per day. You can hover over the graph to see the exact number of downloads per day.

Last 365 days

This package has been downloaded 82,909 times in the last 365 days. The kind of number that gets mentioned in a keynote speech. Well done! The day with the most downloads was Aug 20, 2024 with 586 downloads.

The following line graph shows the downloads per day. You can hover over the graph to see the exact number of downloads per day.

Data provided by CRAN


Binaries


Dependencies

  • Depends1 package
  • Imports5 packages
  • Suggests11 packages
  • Linking To3 packages
  • Reverse Depends1 package
  • Reverse Imports6 packages
  • Reverse Suggests5 packages