[R] lqs function for S-estimator

Annalisa Orenti annalisaorenti at libero.it
Wed Mar 18 15:11:58 CET 2015


Dear R-Users,
I need to fit a regression by means of S-estimator, but I found an 
inconsistency in lqs function in MASS package.
When recalling coefficient estimates two discordant answers are obtained by 
coef() function and by $coef object:
As an example I report here the results of fitting regression S-estimator on 
stackloss data:

library(MASS)
Sestim<-lqs(stack.loss ~ Air.Flow + Water.Temp + Acid.Conc., data = stackloss, 
method = "S")
coef(Sestim)
 (Intercept)            Air.Flow   Water.Temp   Acid.Conc. 
-35.37610619   0.82522124   0.44247788  -0.07964602 
Sestim$coef
                           Air.Flow   Water.Temp   Acid.Conc. 
-36.92530315   0.84957479   0.43047554  -0.07354065 

Do you have any suggestions?
Thank you for your help.
Best regards.
Annalisa



More information about the R-help mailing list