predict.lqs               package:lqs               R Documentation

_P_r_e_d_i_c_t _f_r_o_m _a_n _l_q_s _F_i_t

_D_e_s_c_r_i_p_t_i_o_n:

     Predict from an resistant regression fitted by `lqs'.

_U_s_a_g_e:

     predict.lqs(object, newdata)

_A_r_g_u_m_e_n_t_s:

  object: object inheriting from class `lqs' 

 newdata: matrix or data frame of cases to be predicted or, if object
          has a formula, a data frame with columns of the same names as
          the variables used. A vector will be interpreted as a row
          vector.  If `newdata' is missing, an attempt will be made to
          retrieve the data used to fit the `lqs' object. 

_D_e_t_a_i_l_s:

     This function is a method for the generic function `predict()' for
     class `lqs'. It can be invoked by calling `predict(x)' for an
     object `x' of the appropriate class, or directly by calling
     `predict.lqs(x)' regardless of the class of the object.

     Missing values in `newdata' are handled by returning `NA' if the
     linear discriminants cannot be evaluated. If `newdata' is omitted
     and the `na.action' of the fit omitted cases, these will be
     omitted on the prediction.

_V_a_l_u_e:

     A vector of predictions.

_A_u_t_h_o_r(_s):

     B.D. Ripley

_S_e_e _A_l_s_o:

     `lqs'

_E_x_a_m_p_l_e_s:

     data(stackloss)
     set.seed(123)
     fm <- lqs(stack.loss ~ ., data = stackloss, method = "S", nsamp = "exact")
     predict(fm, stackloss)

