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-M / help / survival4 / residuals.survreg < prev    next >
Encoding:
Text File  |  1997-09-13  |  1.7 KB  |  52 lines

  1.     
  2.     _C_o_m_p_u_t_e _R_e_s_i_d_u_a_l_s _f_o_r _s_u_r_v_r_e_g _O_b_j_e_c_t_s
  3.     
  4.          residuals.survreg(object, type)
  5.          This is a method for the function residuals() for objects inheriting from
  6.          class glm.  Several types of residuals are available for glm objects,
  7.          hence the additional argument:
  8.     
  9.     _A_r_g_u_m_e_n_t_s:
  10.     
  11.              type:
  12.          type of residuals, with choices "deviance", "pearson",
  13.          "working" or `"matrix"; the first is the default.
  14.     
  15.          Value:
  16.     
  17.          A vector of residuals is returned.  The sum of squared
  18.          deviance residuals add up to the deviance.  The pearson
  19.          residuals are standardized residuals on the scale of
  20.          the response.  The working residuals reside on the
  21.          object, and are the residuals from the final IRLS fit.
  22.          The matrix type produces a matrix based on derivatives
  23.          of the log-likelihood function.  Let L be the log-
  24.          likelihood, p be the linear preditor X %*% coef, and s
  25.          be log(sigma).  Then the 6 columns of the matrix are L,
  26.          dL/dp, ddL/(dp dp), dL/ds, ddL/(ds ds) and ddL/(dp ds),
  27.          where d stands for the derivative and dd the second
  28.          derivative.  Diagnstics based on these quantities are
  29.          dicussed in an article by Escobar and Meeker.
  30.     
  31.          References:
  32.     
  33.          Escobar and Meeker (1992). Assessing influence in
  34.          regression analysis with censored data.
  35.          (
  36.           c
  37.           k
  38.           s
  39.           l
  40.            sh)fIBiometrics,(
  41.                             c
  42.                             k
  43.                             s
  44.                             l
  45.                              sh)fP 48, 507-528.
  46.     
  47.     _E_x_a_m_p_l_e_s:
  48.     
  49.          fit <- survreg(Surv(time,status) ~x, aml)
  50.          rr  <- residuals(fit, type='matrix')
  51.     
  52.