View source: R/survregpredict.R
survregpredict | R Documentation |
Fit survival probabilties from a survreg object.
survregpredict(fit, newdata, time)
fit |
a survreg object. This should not contain strata(). It also must use the log transformation. |
newdata |
a new data set with covariates from the fit. |
time |
a time value (on the original, and not log, scale). |
#Fit the survival probability for an individual with extent 1 and
#differentiation 2 at 700 days from a Weibull regression using the
#colon cancer data set distributed as part of the survival package.
fit<-survreg(Surv(time,status)~factor(extent)+differ,data=colon)
survregpredict(fit,data.frame(extent=1,differ=2),700)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.