predict.coxph            package:survival            R Documentation

_P_r_e_d_i_c_t_i_o_n_s _f_o_r _C_o_x _m_o_d_e_l

_D_e_s_c_r_i_p_t_i_o_n:

     Compute fitted values and regression terms for a model fitted by
     'coxph'

_U_s_a_g_e:

     ## S3 method for class 'coxph':
     predict(object, newdata, type=c("lp", "risk", "expected", "terms"), se.fit=FALSE, terms=names(object$assign), collapse, safe=FALSE,...)

_A_r_g_u_m_e_n_t_s:

  object: A 'coxph' object

 newdata: Optional new data to predict at

    type: Type of prediction wanted

  se.fit: Return standard errors as well?

   terms: If 'type="terms"', which terms to return.

collapse: identifier for which rows correspond to different individuals

    safe: Use a more intensive `safe' prediction method

     ...: other unused arguments

_V_a_l_u_e:

     A vector or matrix of fitted values. If 'se.fit=TRUE' a list whose
     first component is the fitted values and second is the standard
     errors.

_S_e_e _A_l_s_o:

     'predict','coxph','termplot'

_E_x_a_m_p_l_e_s:

     fit<-coxph(Surv(time,status)~x,data=aml)
     predict(fit,type="lp")
     predict(fit,type="risk")
     predict(fit,type="expected")
     predict(fit,type="terms")
     predict(fit,type="lp",se.fit=TRUE)
     predict(fit,type="risk",se.fit=TRUE)
     predict(fit,type="expected",se.fit=TRUE)
     predict(fit,type="terms",se.fit=TRUE)

