I am using the lmrob
function in R using the robustbase
library for robust regression. I would use it as, rob_reg<-lmrob(y~0+.,dat,method="MM",control=a1)
. When i want to return the summary i use summary(rob_reg)
and one thing robust regression do is identifying outliers in the data. A certain part of the summary output give me the following,
6508 observations c(49,55,58,77,104,105,106,107,128,134,147,153,...)
are outliers with |weight| <= 1.4e-06 ( < 1.6e-06);
which list all the outliers, in this case 6508 (i removed the majority and replaced it by ...). I need to somehow get these these outliers and remove them from my data. What i did before was to use summary(rob_reg)$rweights
to get all the weights for the observations and remove those observations with a weight less than say a certain value in the example above the value would be 1.6e-06
. I would like to know, is there a way to get a list of only the outliers without first getting the weights of all the observations?