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 / coxph < prev    next >
Encoding:
Text File  |  1997-09-13  |  6.6 KB  |  163 lines

  1.     
  2.     (
  3.      c
  4.      k
  5.      s
  6.      l
  7.       sh)." SCCS @(#)coxph.d    1.7 07/26/95
  8.     
  9.     _P_r_o_p_o_r_t_i_o_n_a_l _H_a_z_a_r_d_s _R_e_g_r_e_s_s_i_o_n _F_i_t _a _C_o_x _p_r_o_p_o_r_t_i_o_n_a_l
  10.     _h_a_z_a_r_d_s _m_o_d_e_l.  _T_i_m_e _d_e_p_e_n_d_e_n_t _v_a_r_i_a_b_l_e_s, _t_i_m_e _d_e_p_e_n_d_e_n_t
  11.     _s_t_r_a_t_a, _m_u_l_t_i_p_l_e _e_v_e_n_t_s _p_e_r _s_u_b_j_e_c_t, _a_n_d _o_t_h_e_r _e_x_t_e_n_s_i_o_n_s
  12.     _a_r_e _i_n_c_o_r_p_o_r_a_t_e_d _u_s_i_n_g _t_h_e _c_o_u_n_t_i_n_g _p_r_o_c_e_s_s _f_o_r_m_u_l_a_t_i_o_n _o_f
  13.     _A_n_d_e_r_s_o_n _a_n_d _G_i_l_l.
  14.     
  15.          coxph(formula, data=sys.parent(), subset,
  16.                 na.action, weights, eps=0.0001, init,
  17.                 iter.max=10, method=c("efron","breslow","exact"),
  18.                 singular.ok=T, robust,
  19.                 model=F, x=F, y=T)
  20.     
  21.     _A_r_g_u_m_e_n_t_s:
  22.     
  23.           formula:
  24.          a formula object, with the response on the left of a ~
  25.          operator, and the terms on the right.  The response
  26.          must be a survival object as returned by the Surv func-
  27.          tion.
  28.     
  29.              data:
  30.          a data.frame in which to interpret the variables named
  31.          in the formula, or in the subset and the weights argu-
  32.          ment.
  33.     
  34.            subset:
  35.          expression saying that only a subset of the rows of the
  36.          data should be used in the fit.
  37.     
  38.         na.action:
  39.          a missing-data filter function, applied to the
  40.          model.frame, after any subset argument has been used.
  41.          Default is options()a.action.
  42.     
  43.           weights:
  44.          case weights.
  45.     
  46.               eps:
  47.          convergence criteria.  Iteration will continue until
  48.          relative change in log-likelihood is less than eps.
  49.          Default is .0001.
  50.     
  51.              init:
  52.          vector of initial values of the iteration.  Default
  53.          initial value is zero for all variables.
  54.     
  55.          iter.max:
  56.          maximum number of iterations to perform.  Default is
  57.          10.
  58.     
  59.            method:
  60.          method for tie handling.  If there are no tied death
  61.          times all the methods are equivalent.  Nearly all Cox
  62.          regression programs use the Breslow method by default,
  63.          but not this one.  The Efron approximation is used as
  64.          the default here, as it is much more accurate when
  65.          dealing with tied death times, and is as efficient com-
  66.          putaionally.  The exact method computes the exact par-
  67.          tial likelihood, which is equivalent to a conditional
  68.          logistic model.  If there are a large number of ties
  69.          the computational time will be excessive.
  70.     
  71.       singular.ok:
  72.          If TRUE, the program will automatically skip over
  73.          columns of the X matrix that are linear combinations of
  74.          earlier columns.  In this case the coefficients for
  75.          such columns will be NA, and the variance matrix will
  76.          contain zeros.  For ancillary calculations, such as the
  77.          linear predictor, the missing coefficients are treated
  78.          as zeros.
  79.     
  80.            robust:
  81.          if TRUE a robust variance estimate is returned.
  82.          Default is TRUE if the model includes a cluster()
  83.          operative, FALSE otherwise.
  84.     
  85.         model,x,y:
  86.          flags to control what is returned.  If these are true,
  87.          then the model frame, the model matrix, and/or the
  88.          response is returned as components of the fitted model,
  89.          with the same names as the flag arguments.
  90.     
  91.          Value:
  92.     
  93.          an object of class "coxph"
  94.     
  95.          Depending on the call, the predict, residuals, and
  96.          survfit routines may need to reconstruct the x matrix
  97.          created by coxph.  Differences in the environment, such
  98.          as which data frames are attached or the value of
  99.          options()ontrasts, may cause this computation to fail
  100.          or worse, to be incorrect.  See the survival overview
  101.          document for details.  The proportional hazards model
  102.          is usually expressed in terms of a single survival time
  103.          value for each person, with possible censoring.  Ander-
  104.          son and Gill reformulated the same problem as a count-
  105.          ing process; as time marches onward we observe the
  106.          events for a subject, rather like watching a Geiger
  107.          counter.  The data for a subject is presented as multi-
  108.          ple rows or "observations", each of which applies to an
  109.          interval of observation (start, stop].
  110.     
  111.          There are two special terms that may be used in the
  112.          model equation.  A 'strata' term identifies a strati-
  113.          fied Cox model; separate baseline hazard functions are
  114.          fit for each strata.  The cluster term is used to com-
  115.          pute a robust variance for the model.  The term +
  116.          cluster(id), where id == unique(id), is equivalent to
  117.          specifying the robust=T argument, and produces an
  118.          approximate jackknife estimate of the variance.  If the
  119.          id variable were not unique, but instead identifies
  120.          clusters of correlated observations, then the variance
  121.          estimate is based on a grouped jackknife.
  122.     
  123.          In certain data cases the actual MLE estimate of a
  124.          coefficient is infinity, e.g., a dichotomous variable
  125.          where one of the groups has no events.  When this hap-
  126.          pens the associated coefficient grows at a steady pace
  127.          and a race condition will exist in the fitting routine:
  128.          either the log likelihood converges, the information
  129.          matrix becomes effectively singular, an argument to exp
  130.          becomes too large for the computer hardware, or the
  131.          maximum number of interactions is exceeded.  The rou-
  132.          tine attempts to detect when this has happened, not
  133.          always successfully.
  134.     
  135.          References:
  136.     
  137.          P. Andersen and R. Gill. "Cox's regression model for
  138.          counting processes, a large sample study", Annals of
  139.          Statistics, 10:1100-1120, 1982. T.Therneau, P.
  140.          Grambsch, and T.Fleming. "Martingale based residuals
  141.          for survival models", Biometrika, March 1990.
  142.     
  143.          cluster, survfit, Surv, strata.
  144.     
  145.     _E_x_a_m_p_l_e_s:
  146.     
  147.          # Create the simplest test data set
  148.          #
  149.          > test1 <- list(time=  c(4, 3,1,1,2,2,3),
  150.                          status=c(1,NA,1,0,1,1,0),
  151.                          x=     c(0, 2,1,1,1,0,0),
  152.                          sex=   c(0, 0,0,0,1,1,1))
  153.          > coxph( Surv(time, status) ~ x + strata(sex), test1)  #stratified model
  154.          #
  155.          # Create a simple data set for a time-dependent model
  156.          #
  157.          > test2 <- list(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
  158.                          stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
  159.                          event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
  160.                          x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
  161.          > summary( coxph( Surv(start, stop, event) ~ x, test2))
  162.     
  163.