Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I've been using the lm function in R to do demand modeling (tons of steel to be predicted by various economic indicators). I used $R^2$ and $F$ to report on the strength of the model. However, when I use the R function lqs ("resistant regression") and then type in summary(model_name) I do not get any statistics that I can use to report on the strength of the regression model. Any suggestions?

EDIT: Thanks for your quick response. I don't have a problem with lqs(). The problem is that when I type in summary(Model) I do not get any goodness of fit information (e.g., adjusted R squared) as I do when I enter summary(x) where X is a model created using the lm function. I'd like to have something to show the strength of the model. I"m using MASS. See below. Regards, Bill Yarberry

library(MASS)

M10 = lqs(agri ~ p12+p1+p11+p5+p8+p6+p25+p50+p35, data = agri_data2) summary(M10) Length Class Mode
crit 1 -none- numeric
sing 1 -none- character coefficients 10 -none- numeric
bestone 10 -none- numeric
fitted.values 103 -none- numeric
residuals 103 -none- numeric
scale 2 -none- numeric
terms 3 terms call
call 3 -none- call
xlevels 0 -none- list
model 10 data.frame list
share|improve this question
@williamyarberry Register here and on maths with the same OpenID to recover the ownership of your question (if you think it is worth it, of course ;-) ). You can do it by clicking "log in" at the top bar. – mbq Feb 28 '11 at 20:31

migrated from math.stackexchange.com Feb 24 '11 at 23:21

1 Answer

Try typing:

model_name

Based on a quick skim of the lqs() documentation in the MASS package this looks like it should work. If it doesn't work and you're not using MASS, please specify which library you're running lqs() from (and maybe even point to the documentation if you want to make everybody's life easier).

share|improve this answer
In response to your edit, @williamyarberry, I apologize for not realizing what exactly you meant by the original question. I've been poking around in the documentation for MASS and I'm also uncertain why the output doesn't provide any summary information about model fit. Presumably, you could use the fitted.values and residuals stored in the M10 object to calculate $R^2$ independently, but I do not know if that's a sensible approach with this method. – ashaw Mar 1 '11 at 3:26
I should note that a general point common to many Robust/Resistant techniques (I've mostly worked with Huber estimators) is that they require you to bootstrap standard errors & $R^2$ values. Two discussions I found useful in my searches on this topic (and which contain code for bootstraping standard errors for an lqs model) can be found here and here (PDF). I also recommend exploring the sources cited in the MASS documentation. – ashaw Mar 1 '11 at 3:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.