I'm currently working with accelerated time failure models. However, when I fit a model using survreg in R, the predict function only seems to return expected lifetime.

I'm wondering how one can use a fitted accelerated time failure model to predict probability of survival within a given time interval, conditional on covariates and time already survived.

That is, I would like to know:

enter image description here

Ideally, I would have a predict function that accepts a fitted model object, the times in question, and new data containing covariates as arguments. The function then returns probability of survival up to each time, i.e. the conditional survival function, for each observation in the new dataset.

Edit To make this reproducible:

lfit <- survreg(Surv(time, status) ~ ph.ecog, data=lung)
pct <- 1:98/100 # The 100th percentile of predicted survival is at +infinity
ptime <- predict(lfit, newdata=data.frame(ph.ecog=2), type='quantile',

ptime contains the number of days associated with each percentile. I want the inverse: to supply a time value and get the probability of survival.


1 Answer 1


There are several ways to do this including

summary(lfit, ...)
f <- psm(Surv(time, status), ...)
survest(f, ...)
S <- Survival(f) # derive fitted survival function analytically in R notation
S( )

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.