renewal | R Documentation |
Generate a random draws from the distribution of recurrent set of survival times under a renewal Poisson process following Leemis (1987)
renewhr(SURVIVAL, hr, prevtime)
renewaft(SURVIVAL, prevtime, aft)
SURVIVAL |
Object of survival class |
hr |
Vector of hazard ratios |
prevtime |
Vector of previous survival times |
aft |
Vector of accelerated failure time ratios |
Vector of survival times
Vector of survival times
renewhr()
: Recurrent episodes under a proportional hazard model
renewaft()
: Recurrent episodes under an accelerated failure time model
s_obj <- s_exponential(fail = 0.4, t = 1)
hr <- c(1,1,0.5,0.5)
time1 <- rsurvhr(s_obj, hr)
time2 <- renewhr(s_obj, hr, time1)
s_obj2 <- s_exponential(fail = 0.4, t = 1)
aft <- c(1,1,0.5,0.5)
timea <- rsurvaft(s_obj2, aft)
timeb <- renewaft(s_obj2, aft, timea)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.