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,300 times in the last 30 days. That's a lot of interest! Someone might even write a blog post about it. The following heatmap shows the distribution of downloads per day. Yesterday, it was downloaded 305 times.

Sun
Mon
Tue
Wed
Thu
Fri
Sat
0 downloadsMar 2, 2025
0 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
224 downloadsMar 15, 2025
182 downloadsMar 16, 2025
294 downloadsMar 17, 2025
301 downloadsMar 18, 2025
288 downloadsMar 19, 2025
330 downloadsMar 20, 2025
277 downloadsMar 21, 2025
177 downloadsMar 22, 2025
174 downloadsMar 23, 2025
370 downloadsMar 24, 2025
246 downloadsMar 25, 2025
302 downloadsMar 26, 2025
290 downloadsMar 27, 2025
324 downloadsMar 28, 2025
169 downloadsMar 29, 2025
169 downloadsMar 30, 2025
227 downloadsMar 31, 2025
313 downloadsApr 1, 2025
305 downloadsApr 2, 2025
0 downloadsApr 3, 2025
0 downloadsApr 4, 2025
0 downloadsApr 5, 2025
169
452

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 84,664 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