predict.survreg           package:survival           R Documentation

_P_r_e_d_i_c_t_e_d _V_a_l_u_e_s _f_o_r _a '_s_u_r_v_r_e_g' _O_b_j_e_c_t

_D_e_s_c_r_i_p_t_i_o_n:

     Predicted values for a 'survreg' object

_U_s_a_g_e:

     ## S3 method for class 'survreg':
     predict(object, newdata, 
     type=c("response", "link", "lp", "linear",  "terms", "quantile", 
             "uquantile"), 
     se.fit=FALSE, terms=NULL, p=c(0.1, 0.9),...)

_A_r_g_u_m_e_n_t_s:

  object: result of a model fit using the 'survreg' function. 

 newdata: data for prediction.  If absent, predictions are for the
          subjects used in the original fit. 

    type: 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. 

     ...: other arguments

_V_a_l_u_e:

     a vector or matrix of predicted values.

_R_e_f_e_r_e_n_c_e_s:

     Escobar and Meeker (1992). Assessing influence in regression
     analysis with censored data. _Biometrics,_ 48, 507-528.

_S_e_e _A_l_s_o:

     'survreg', 'residuals.survreg'

_E_x_a_m_p_l_e_s:

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

