[R] rlm and lmrob error messages

Dieter Menne dieter.menne at menne-biomed.de
Wed May 14 18:36:48 CEST 2008


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 rlm

Please 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



More information about the R-help mailing list