rankhazardplot          package:rankhazard          R Documentation

_C_r_e_a_t_e _a _r_a_n_k-_h_a_z_a_r_d _p_l_o_t

_D_e_s_c_r_i_p_t_i_o_n:

     'rankhazardplot' creates a rank-hazard plot of the covariates of a
     proportional hazards model.

_U_s_a_g_e:

     rankhazardplot(...)
     rankhazardplot.coxph(coxphobj,refvalues=NULL,x=NULL,legendtext=NULL,axistext=NULL,plottype="hazard",...)
     rankhazardplot.cph(cphobj,refvalues=NULL,x=NULL,legendtext=NULL,axistext=NULL,plottype="hazard",...)
     rankhazardplot.default(x,coefs=NULL,xp=NULL,refvalues=NULL,legendtext=NULL,axistext=NULL,plottype="hazard",col=NULL,pch=NULL,lwd=1,...)

_A_r_g_u_m_e_n_t_s:

coxphobj: An object of class 'coxph' (survival).

  cphobj: An object of class 'cph' (Design).

refvalues: A vector of reference values given in the same order as the
          covariates in the model. If 'NULL', the medians of each
          covariate are used.  

       x: A matrix or data frame of the covariate data. Needed if the
          'coxphobj$x' or 'cphobj$x' does not exist.

legendtext: A vector of covariate names for the legend box. If 'NULL',
          the column names are from 'x', 'coxphobj$x' or 'cphobj$x'.

axistext: A vector of covariate names and units for the x-axis. If
          'NULL', the column names are from 'x', 'coxphobj$x' or
          'cphobj$x'.

plottype: Scaling for the y-axis. Either '"hazard"' for the relative
          hazard with log-scale or '"loghazard"' for the logarithm of
          the relative hazard with linear scale.

   coefs: A vector of regression coefficients for the covariates. If
          'NULL', 'xp' is required.

      xp: Predictions ("terms") for the covariates. If 'NULL', 'coefs'
          is required and 'xp' is calculated a product of 'coefs' and
          'x'.

     col: See documentation for 'par'.

     pch: See documentation for 'points'.

     lwd: See documentation for 'par'.

     ...: Other arguments to passed to the plotting commands. 

_D_e_t_a_i_l_s:

     The function receives a coxph (package survival) object or a cph
     (package Design) object as an argument and creates a rank-hazard
     plot of the  covariates. The reference values for the relative
     hazards and legend texts can be provided as optional arguments.
     Plotting parameters such as, lwd, lty, col and pch are passed to
     the plotting commands.

_A_u_t_h_o_r(_s):

     Juha Karvanen

_R_e_f_e_r_e_n_c_e_s:

     J. Karvanen, F. E. Harrell Jr., Visualizing covariates in
     proportional hazards model. Statistics in Medicine, 28:1957-1966,
     2009.

_S_e_e _A_l_s_o:

     'coxph' and 'cph'

_E_x_a_m_p_l_e_s:

     library(survival)
     model <- coxph(Surv(time,status) ~ age + sex + ph.karno, data=cancer, x=TRUE)
     rankhazardplot(model)

