Skip to content
Prev 362 / 523 Next

[RsR] How does "rlm" in R decide its "w" weights for each IRLSiteration?

Your code is running for M-estimator, but not for MM (I don't know the
reason).
See the results here.
Error: lqs failed: all the samples were singular
Call:
rlm(formula = form, method = "M")
Converged in 7 iterations

Coefficients:
(Intercept)          xn         xf1         xf2         xf3         xf4 
  0.2017169   0.8708498   0.4001550   2.0120847   2.7285940   3.2854743 
        xf5         xf6         xf7         xf8 
  4.9677143   6.0077015   6.4267159   9.8351416 

Degrees of freedom: 100 total; 90 residual
Scale estimate: 0.713

Regards
Rohan




-----Original Message-----
From: Dr. Peter Ruckdeschel
[mailto:peter.ruckdeschel at itwm.fraunhofer.de] 
Sent: Tuesday, 24 July 2012 2:07 a.m.
To: r-sig-robust at r-project.org
Cc: Valentin Todorov; Maheswaran Rohan; S.Ellison at lgcgroup.com
Subject: Re: [RsR] How does "rlm" in R decide its "w" weights for each
IRLSiteration?

To what it's worth:

Valentin very well knows about the MM implementation of rlm;

it is simply that lmrob is a more recent implementation which has
taken up _very_ recent current research results on this field and
also includes the combined case (i.e. factors  and numerics as
regressors) (see ?lmrob) or try

set.seed(123)
 xr=rpois(100,lambda=3)
 xn=rnorm(100)
 xf =as.factor(xr)
 yn=rnorm(100)+xn+xr
 form=yn~xn+xf
 rlm(form,method="MM")
Error: lqs failed: all the samples were singular
Call:
lmrob(formula = form, method = "MM")

Coefficients:
(Intercept)           xn          xf1          xf2          xf3         
xf4 
     0.2260       0.8957       0.3633       1.9949       2.6660      
3.2966 
        xf5          xf6          xf7          xf8 
     4.9415       5.9208       6.4388       9.8285 

Hth, best, Peter

Am 23.07.2012 15:19, schrieb S Ellison: