In R, I'm using lmrob from the robustbase package to fit a simple linear model of the form:
lmrob(value ~ t + as.factor(r) + as.factor(c) + 0, data=subs, setting="KS2014")
This works fine 95% of the time, but every once in a while the call fails and gives this error:
Error: DGELS: weighted design matrix not of full rank (column XX).
where XX is varying column number. I can fix this by simply executing the lmrob command repeatedly until it finally succeeds -- usually this take 1-2 tries until it works. Note that I am not changing any of the inputs when I rerun lmrob.
Does anyone know of a setting I can change to avoid having to manually re-run the lmrob command to get it to work? I've tried changing some of the control parameters without success:
lm_control <- lmrob.control(setting="KS2014")
lm_control$max.it <- 1000
lm_control$nResample <- 1500