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 / survreg < prev    next >
Encoding:
Text File  |  1997-09-13  |  2.2 KB  |  76 lines

  1.     
  2.     _R_e_g_r_e_s_s_i_o_n _f_o_r _a _p_a_r_a_m_e_t_r_i_c _s_u_r_v_i_v_a_l _m_o_d_e_l
  3.     
  4.          survreg(formula, data=sys.parent(), subset, na.action,
  5.          link=c("log", "identity"),
  6.          dist=c("extreme", "logistic", "gaussian", "exponential"),
  7.          fixed, eps=0.0001, init, iter.max=10, model=F, x=F, y=F, ...)
  8.     
  9.     _A_r_g_u_m_e_n_t_s:
  10.     
  11.           formula:
  12.          a formula expression as for other regression models.
  13.          See the documentation for lm and formula for details.
  14.     
  15.              data:
  16.          optional data frame in which to interpret the variables
  17.          occuring in the formula.
  18.     
  19.            subset:
  20.          subset of the observations to be used in the fit.
  21.     
  22.         na.action:
  23.          function to be used to handle any NAs in the data.
  24.     
  25.              link:
  26.          transformation to be used on the y variable.
  27.     
  28.              dist:
  29.          assumed distribution for the transformed y variable.
  30.     
  31.             fixed:
  32.          a list of fixed parameters, most often just the scale.
  33.          (When I implement the t-dist, it will include the
  34.          degrees of freedom).
  35.     
  36.               eps:
  37.          convergence criteria for the computation.  Iteration
  38.          continues until the relative change in log likelihood
  39.          is less than eps.
  40.     
  41.              init:
  42.          optional vector of initial values for the paramters.
  43.     
  44.          iter.max:
  45.          maximum number of iterations to be performed.
  46.     
  47.             model:
  48.          if TRUE, the model frame is returned.
  49.     
  50.                 x:
  51.          if TRUE, then the X matrix is returned.
  52.     
  53.                 y:
  54.          if TRUE, then the y vector (or survival times) is
  55.          returned.
  56.     
  57.          all the optional arguments to lm, including
  58.          singular.ok.
  59.     
  60.          Value:
  61.     
  62.          an object of class survreg is returned, which inherits
  63.          from class glm.
  64.     
  65.            This routine is not as robust against nearly singular
  66.          X matrices as lm(); the problem occurs when we expli-
  67.          citly invert the covariance matrix with solve().  This
  68.          can sometimes be solved by subtracting the mean from
  69.          all continuous covariates.
  70.     
  71.     _E_x_a_m_p_l_e_s:
  72.     
  73.          survreg(Surv(futime, fustat) ~ ecog.ps + rx, fleming, dist='extreme',
  74.                  link='log', fixed=list(scale=1))   #Fit an exponential
  75.     
  76.