home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / survival4 / plot.cox.zph < prev    next >
Encoding:
Text File  |  1997-09-13  |  1.7 KB  |  51 lines

  1.     
  2.     _G_r_a_p_h_i_c_a_l _t_e_s_t _o_f _p_r_o_p_o_r_t_i_o_n_a_l _h_a_z_a_r_d_s _D_i_s_p_l_a_y_s _a _g_r_a_p_h _o_f
  3.     _t_h_e _s_c_a_l_e_d _S_h_o_e_n_f_e_l_d _r_e_s_i_d_u_a_l_s, _a_l_o_n_g _w_i_t_h _a _s_m_o_o_t_h.
  4.     
  5.          plot.cox.zph(x, resid=T, se=T, df=4, nsmo=40, var)
  6.     
  7.     _A_r_g_u_m_e_n_t_s:
  8.     
  9.                 x:
  10.          result of the cox.zph function.
  11.     
  12.             resid:
  13.          include the residuals on the plot, as well as the
  14.          smooth fit.
  15.     
  16.                se:
  17.          if true, confidence bands at 2 standard errors will be
  18.          added.
  19.     
  20.                df:
  21.          the degrees of freedom for the fitted natural spline.
  22.          A df value of 2 leads to a linear fit.
  23.     
  24.              nsmo:
  25.          number of points used to plot the fitted spline.
  26.     
  27.               var:
  28.          the set of variables for which plots are desired.  By
  29.          default, plots are produced in turn for each variable
  30.          of a model.  Selection of a single variable allows
  31.          other features to be added to the plot, e.g., a hor-
  32.          izontal line at zero or a main title.  This has been
  33.          superseded by a subscripting method; see the example
  34.          below.
  35.     
  36.          a plot is produced on the current graphics device.
  37.     
  38.          cox.zph, coxph
  39.     
  40.     _E_x_a_m_p_l_e_s:
  41.     
  42.          vfit <- coxph(Surv(futime,fustat) ~ rx + factor(celltype) + karno +age,
  43.                     data=veteran, x=T)
  44.          temp <- cox.zph(vfit)
  45.          plot(temp[5])          #do only the Karnofsky score plot
  46.          #plot(temp, var=5)      #  old way of doing the prior command
  47.          abline(0,0, lty=3)
  48.          lines( lm( temp[,5] ~ temp), lty=4)   #Add the linear fit as well
  49.          title(main="VA Lung Study")
  50.     
  51.