

survreg(survival4)                           R Documentation

_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

_U_s_a_g_e_:

     survreg(formula, data=sys.parent(), subset, na.action,
     link=c("log", "identity"),
     dist=c("extreme", "logistic", "gaussian", "exponential"),
     fixed, eps=0.0001, init, iter.max=10, model=F, x=F, y=F, ...)

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

 formula: a formula expression as for other regression mod-
          els.  See the documentation for `lm' and `formula'
          for details.

    data: optional data frame in which to interpret the
          variables occuring in the formula.

  subset: subset of the observations to be used in the fit.

na.action: function to be used to handle any NAs in the
          data.

    link: transformation to be used on the y variable.

    dist: assumed distribution for the transformed y vari-
          able.

   fixed: a list of fixed parameters, most often just the
          scale.  (When I implement the t-dist, it will
          include the degrees of freedom).

     eps: convergence criteria for the computation.  Itera-
          tion continues until the relative change in log
          likelihood is less than eps.

    init: optional vector of initial values for the
          paramters.

iter.max: maximum number of iterations to be performed.

   model: if TRUE, the model frame is returned.

       x: if TRUE, then the X matrix is returned.

       y: if TRUE, then the y vector (or survival times) is
          returned.

     ...: all the optional arguments to lm, including `sin-
          gular.ok'.

_V_a_l_u_e_:

     an object of class `survreg' is returned, which inher-
     its from class `glm'.

_C_o_m_p_u_t_a_t_i_o_n_:

     This routine is not as robust against nearly singular X
     matrices as lm(); the problem occurs when we explicitly
     invert the covariance matrix with solve().  This can
     sometimes be solved by subtracting the mean from all
     continuous covariates.

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

     data(ovarian)
     survreg(Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist='extreme',
                     link='log', fixed=list(scale=1))   #Fit an exponential

