lmRob(formula, data, weights, subset, na.action,
model = TRUE, x = FALSE, y = FALSE, contrasts = NULL,
nrep = NULL, control = lmRob.control(...), ...)formula object, with the response on the left of a ~ operator, and the terms, separated by + operators, on the right.data.frame in which to interpret the variables named in the formula, or in the subset and the weights argument. If this is missing, then the variables in the formula should be on
the searcweights must be the same as
the number of observations. The weighmodel.frame after any subset argument has been used. The default (with na.fail) is to create an error if any missing values are found. A possible alternativTRUE, the model frame is returned in component model.TRUE, the model matrix is returned in component x.TRUE, the response is returned in component y."Exhaustive" resampling is being used, the value of nrep is ignored.lmRob.control for the possible control parameters and their default settings."Exhaustive" resampling is chosen). Hence you will get (slightly) different answers each time if you make the same call with a different seed. See lmRob.control for how to set the seed, and see lmRob.object for a complete description of the object returned.Marazzi, A. (1993). Algorithms, routines, and S functions for robust statistics. Wadsworth & Brooks/Cole, Pacific Grove, CA. Maronna, R. A., and Yohai, V. J. (2000). Robust regression with both continuous and categorical predictors. Journal of Statistical Planning and Inference 89, 197--214.
Pena, D., and Yohai, V. (1999). A Fast Procedure for Outlier Diagnostics in Large Regression Problems. Journal of the American Statistical Association 94, 434--445.
Yohai, V. (1988). High breakdown-point and high efficiency estimates for regression. Annals of Statistics 15, 642--665.
Yohai, V., Stahel, W. A., and Zamar, R. H. (1991). A procedure for robust estimation and inference in linear regression; in Stahel, W. A. and Weisberg, S. W., Eds., Directions in robust statistics and diagnostics, Part II. Springer-Verlag.
lmRob function automatically chooses an appropriate algorithm to compute a final robust estimate with high breakdown point and high efficiency. The final robust estimate is computed based on an initial estimate with high breakdown point. For the initial estimation, the alternate M-S estimate is used if there are any factor variables in the predictor matrix, and an S-estimate is used otherwise. To compute the S-estimate, a random resampling or a fast procedure is used unless the data set is small, in which case exhaustive resampling is employed. See lmRob.control for how to choose between the different algorithms.lmRob.control,
lmRob.object.data(stack.dat)
stack.rob <- lmRob(Loss ~ ., data = stack.dat)Run the code above in your browser using DataLab