Hello all, I'm using R2.7.0 (on Windows 2000) and I'm trying do run a robust regression on following model structure: model = "Y ~ x1*x2 / (x3 + x4 + x5 +x6)" where x1 and x2 are both factors (either 1 or 0) and x3.....x6 are numeric. The error code I get when running rlm(as.formula(model), data=daymean) is: error in rlm.default(x, y, weights, method = method, wt.method = wt.method, : 'x' is singular: singular fits are not implemented in rlm As singular.ok = TRUE is default with lmrob from the robustbase package, I tried running the model using lmrob, but I get following error message Too many singular resamples Aborting fast_s() error in lmrob.S(x = x, y = y, control = control) : C function R_lmrob_S() exited prematurely I don't understand what the error messages mean, especially in the case of lmrob and greatly appreciate any help or ideas as to what might cause the error. The model works fine with lm. Kind regards, Susanne
Susanne Komhard <susanne.komhard <at> ise.fraunhofer.de> writes:> I'm using R2.7.0 (on Windows 2000) and I'm trying do run a robust > regression on following model structure: > > model = "Y ~ x1*x2 / (x3 + x4 + x5 +x6)" > > where x1 and x2 are both factors (either 1 or 0) and x3.....x6 are numeric. > The error code I get when running rlm(as.formula(model), data=daymean) is: > > error in rlm.default(x, y, weights, method = method, wt.method = > wt.method, : > 'x' is singular: singular fits are not implemented in rlmPlease supply a complete example, there is too much guessing involved here. Assuming you use the function in MASS (there is one in limma), it could be that the error comes from your "" around the model: library(MASS) summary(rlm("stack.loss ~ Water.Temp", stackloss)) Error in qr.default(x) : NA/NaN/Inf in foreign function call (arg 1) In addition: Warning message: In storage.mode(x) <- "double" : NAs introduced by coercion summary(rlm(stack.loss ~ Water.Temp, stackloss)) Call: rlm(formula = stack.loss ~ Water.Temp, data = stackloss) Residuals: Min 1Q Median 3Q Max -7.6816 -3.6368 0.3632 3.2736 8.7960 Coefficients: Value Std. Error t value (Intercept) -40.8262 8.5789 -4.7589 Water.Temp 2.7612 0.4024 6.8619 Residual standard error: 5.392 on 19 degrees of freedom>Dieter
Possibly Parallel Threads
- cross validation? when rlm, lmrob or lmRob
- Wrong contrast matrix for nested factors in lm(), rlm(), and lmRob()
- Behaviour of standard error estimates in lmRob and the like
- Problem with anova.lmRob() "robust" package
- R: Re: Problem with anova.lmRob() "robust" package