[R] Robust regression error: Too many singular resamples

Alexandra Denby alexandra.denby at gmail.com
Mon Jul 12 20:46:51 CEST 2010


Hello.

I've got a dataset that may have outliers in both x and y.  While I am not
at all familiar with robust regression, it looked like the function lmrob in
package robustbase should handle this situation.  When I try to use it, I
get:

Too many singular resamples
Aborting fast_s_w_mem()

Looking into it further, it appears that for an indicator variable in one of
my interaction terms, 98% of the data have value 1 and only 2% have value 0. 
I believe this is the cause of the problem, but am confused as to why the
algorithm cannot handle this situation.  The probability of actually getting
a singular sample ought to be fairly low, unless the sample sizes are fairly
tiny.  Is there some parameter I can tweak to increase the sample size, or
is something else going on?

You can easily reproduce this by running the following.  Any advice would be
appreciated.  Thank you.

library(robustbase)
x <- rnorm(10000)
isZ <- c(rep(1,9800),rep(0,200))
y <- rnorm(10000)

model <- lmrob(y~x*isZ)

-- 
View this message in context: http://r.789695.n4.nabble.com/Robust-regression-error-Too-many-singular-resamples-tp2286585p2286585.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list