plot.rs.zph             package:relsurv             R Documentation

_G_r_a_p_h_i_c_a_l _I_n_s_p_e_c_t_i_o_n _o_f _P_r_o_p_o_r_t_i_o_n_a_l _H_a_z_a_r_d_s _A_s_s_u_m_p_t_i_o_n _i_n _R_e_l_a_t_i_v_e _S_u_r_v_i_v_a_l _M_o_d_e_l_s

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

     Displays a graph of the scaled partial residuals, along with a
     smooth curve.

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

     ## S3 method for class 'rs.zph':
     plot(x, resid=TRUE, df = 4, nsmo = 40,var,cex=1,add=FALSE,col=1,lty=1,xlab,ylab,scale=1,...)

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

       x: result of the 'rs.zph' function. 

   resid: a logical value, if 'TRUE' the residuals are included on the
          plot, as well as the smooth fit.

      df: the degrees of freedom for the fitted natural spline, 'df=2'
          leads to a linear fit.  

    nsmo: number of points used to plot the fitted spline.  

     var: the set of variables for which plots are desired.  By
          default, plots are produced in turn for each variable of a
          model.  Selection of a single variable allows other features
          to be added to the plot, e.g., a horizontal line at zero or a
          main title. 

     cex: a numerical value giving the amount by which plotting text
          and symbols should be scaled relative to the default. 

     add: logical, if 'TRUE' the plot is added to an existing plot

     col: a specification for the default plotting color.

     lty: the line type.

    xlab: x axis label.

    ylab: y axis label.

   scale: units for x axis, default is 1, i.e. days.

     ...: Additional arguments passed to the 'plot' function. 

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

     'rs.zph', 'plot.cox.zph'.

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

     data(slopop)
     data(rdata)
     fit <- rsadd(Surv(time,cens)~sex+as.factor(agegr)+ratetable(age=age*365,sex=sex,year=year),
           ratetable=slopop,data=rdata,int=5)
     rszph <- rs.zph(fit)
     plot(rszph)

