survregpredict: Fit survival probabilties from a survreg object.

View source: R/survregpredict.R

survregpredictR Documentation

Fit survival probabilties from a survreg object.

Description

Fit survival probabilties from a survreg object.

Usage

survregpredict(fit, newdata, time)

Arguments

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).

Examples

#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)

PHInfiniteEstimates documentation built on Nov. 24, 2023, 9:06 a.m.