orlm                  package:MASS                  R Documentation

_F_i_t _R_o_b_u_s_t _L_i_n_e_a_r _R_e_g_r_e_s_s_i_o_n _M_o_d_e_l

_D_e_s_c_r_i_p_t_i_o_n:

     Fits a robust linear regression model, using an M-estimator with
     Huber's psi function.

_U_s_a_g_e:

     orlm(formula, data, weights, subset, na.action, 
          model=FALSE, k=1.345, sw=1000, ...)

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

 formula: a formula object, with the response on the left of a `~'
          operator, and the terms, separated by `+' operators, on the
          right. 

    data: an optional `data.frame' in which to interpret the variables
          named in the formula, or in the `subset' and the `weights'
          argument. 

 weights: optional weights; if supplied, the algorithm fits to minimize
          the sum of the weights multiplied into the squared residuals.
          The weights must be strictly positive. 

  subset: optional expression saying that only a subset of the rows of
          the data should be used in the fit. 

na.action: a missing-data filter function, applied to the
          `model.frame', after any subset argument has been used. 

   model: flag to control what is returned.  If this is `TRUE', then
          the model frame is returned.  `X' and `y' are always
          returned. 

       k: The control value for Winsorizing. The default gives 95%
          efficiency at the normal. 

      sw: switch to Huber proposal 2 scale at iteration `sw' and
          beyond. 

     ...: additional arguments for the fitting routines. The most
          likely one is `maxit', which sets the iteration limit, by
          default 20. 

_D_e_t_a_i_l_s:

     The fit uses Huber's M-estimator, and initially uses the median
     absolute deviation scale estimate based on the residuals. This can
     be changed to Huber's proposal 2 after `sw' iterations.

     Generic functions such as `print' and `summary' have methods to
     show the results of the fit.

_V_a_l_u_e:

     an object of class `"orlm"' representing the fit, inheriting from
     `lm'. This has all the components of an `lm' object, plus `k,' the
     scale `s' and `conv' which is a vector monitoring the convergence.

_S_e_e _A_l_s_o:

     `rlm'

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

     data(phones)
     attach(phones)
     res <- orlm(calls ~ year)
     print(res)

     data(stackloss)
     rlm(stack.loss ~ stack.x)

