Predicted Values for a survreg Object

DESCRIPTION:

Note: The survreg function is deprecated; please use instead. Predicted values for a survreg object

USAGE:

predict.survreg(object, newdata, type="response" se.fit=F, 
                terms=labels.lm(object), p=c(0.1, 0.9), ripley=F) 

REQUIRED ARGUMENTS:

object
result of a model fit using the survreg function.

OPTIONAL ARGUMENTS:

newdata
data for prediction. If absent predictions are for the subjects used in the original fit.
type
a character string denoting the type of predicted value. This can be on the original scale of the data ( "response"), the linear predictor ( "linear", with "lp" as an allowed abbreviation), a predicted quantile on the original scale of the data ( "quantile"), a quantile on the linear predictor scale ( "uquantile"), or the matrix of terms for the linear predictor (" terms"). At this time "link" and linear predictor ( "lp") are identical.
se.fit
if TRUE, include the standard errors of the prediction in the result.
terms
subset of terms. The default for residual type terms is a matrix with one column for every term (excluding the intercept) in the model.
p
vector of percentiles. This is used only for quantile predictions.
ripley
temporary argument. Compute the standard errors of quantile predictions in the way shown in an a draft of Venables and Ripley i.e., partially ignoring the variance in the estimate of scale.

VALUE:

a vector or matrix of predicted values.

REFERENCES:

Escobar, L. A. and Meeker, W. Q. (1992). Assessing influence in regression analysis with censored data. Biometrics 48, 507-528.

SEE ALSO:

, , .

EXAMPLES:

# Draw figure 1 from Escobar and Meeker 
fit <- survreg(Surv(time,status) ~ age + age^2, data=stanford2, 
     dist='lognormal') 
plot(stanford2$age, stanford2$time, xlab='Age', ylab='Days', 
     xlim=c(0,65), ylim=c(.01, 10^6), log='y') 
pred <- predict(fit, newdata=list(age=1:65), type='quantile', 
     p=c(.1, .5, .9)) 
matlines(1:65, pred, lty=c(2,1,2), col=1)