fwdlm                package:forward                R Documentation

_F_o_r_w_a_r_d _S_e_a_r_c_h _i_n _L_i_n_e_a_r _R_e_g_r_e_s_s_i_o_n

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

     This function applies the forward search approach to robust
     analysis in linear regression models.

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

     fwdlm(formula, data, nsamp = "best", x = NULL, y = NULL, intercept = TRUE, 
           na.action, trace = TRUE)

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

 formula: a symbolic description of the model to be fit. The details of
          the model are the same as for lm.

    data: an optional data frame containing the variables in the model.
          By default the variables are taken from the environment from
          which the function is called.

   nsamp: the initial subset for the forward search in linear
          regression is found by fitting the regression model with the
          R function lmsreg (in package `'lqs''. This argument allows
          to control how many subsets are used in the Least  Median of
          Squares regression. The choices are: the number of samples or
          `"best"' (the default) or `"exact"' or `"sample"'. For
          details see help(lmsreg).

       x: A matrix of predictors values (if no formula is provided).

       y: A vector of response values (if no formula is provided).

intercept: Logical for the inclusion of the intercept (if no formula is
          provided).

na.action: a function which indicates what should happen when the data
          contain `NA's. The default is set by the `na.action' setting
          of `options', and is `na.fail' if that is unset. The default
          is `na.omit'.

   trace: logical, if 'TRUE' a message is printed for every ten
          iterations completed during the forward search.

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

     The function returns an object of class `"fwdlm"' with the
     following components: 

    call: the matched call.

Residuals: a (n x (n-p+1)) matrix of residuals.

    Unit: a matrix of units added (to a maximum of 5 units) at each
          step.

included: a list with each element containing a vector of units
          included at each step of the forward search.

Coefficients: a ((n-p+1) x p) matrix of coefficients.

tStatistics: a ((n-p+1) x p) matrix of t statistics for the
          coefficients.

CookDist: a ((n-p) x 1) matrix of forward Cook's distances.

ModCookDist: a ((n-p) x 5) matrix of forward modified Cook's distances
          for the units (to a maximum of 5 units) included at each
          step.

Leverage: a (n x (n-p+1)) matrix of leverage values.

      S2: a ((n-p+1) x 2) matrix with 1st column containing S^2 and the
          2nd column R^2.

  MaxRes: a ((n-p) x 1) matrix of max studentized residuals.

MinDelRes: a ((n-p-1) x 1) matrix of minimum deletion residuals.

StartingModel: a `"lqs"' object providing the the Least Median of
          Squares regression fit used to select the starting subset.

_A_u_t_h_o_r(_s):

     Originally written for S-Plus by: Kjell Konis
     kkonis@insightful.com and Marco Riani mriani@unipr.it 
      Ported to R by Luca Scrucca luca@stat.unipg.it

_R_e_f_e_r_e_n_c_e_s:

     Atkinson, A.C. and Riani, M. (2000),  _Robust Diagnostic
     Regression Analysis_, First Edition. New York: Springer, Chapters
     2-3.

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

     'summary.fwdlm', 'plot.fwdlm', 'fwdsco', 'fwdglm'.

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

     data(forbes)
     plot(forbes, xlab="Boiling point", ylab="100  log(pressure)")
     mod <- fwdlm(y ~ x, data=forbes)
     summary(mod)
     ## Not run: plot(mod)
     plot(mod, 1)
     plot(mod, 6, ylim=c(-3, 1000))

