# Robust regression in R

I've used an ordinary least square linear regression model in R that looks something like this:

ols <- lm(DV ~ IV1 + IV2)


When I type this:

summary(ols)


I get a table showing Estimate, Std Error, t value and P(>|t|) for each coefficient. I also get the residual standard error, multiple r-square, adjusted r-square, f-statistic, and p-value for the model.

And I've used a robust linear regression model that looks something like this:

roblm <- rlm(DV ~ IV1 + IV2)


When I type this:

summary(roblm)


I get a table showing Value, Std Error, and t value for each coefficient. But I don't get a p-value for each coefficient. Similarly, I get the residual standard error for the model, but I don't get multiple r-square, adjusted r-square, f-statistic, and p-value for the model.

Why aren't these additional statistics provided for the robust linear regression model? Do they not make sense in the context of this model? If these statistics do make sense, how would I go about getting them?

• The price of robustness here is a certain agnosticism about the underlying generating distribution. You can't have it both ways. – Nick Cox Oct 12 '14 at 15:21
• Thanks for the comment. In that case how do I go about presenting my results in a paper? I am in psychology/cognitive science where readers of journal articles are used to seeing p-value or confidence intervals to summarize their results. Without such a summary a typical reader wouldn't be able to interpret the results. I've tried searching for a psychology/cognitive science journal article that provides a nice summary of a robust regression analysis to use for inspiration, but I haven't had any luck yet. – user48881 Oct 14 '14 at 6:23
• Presenting results? 1. You must state the particular flavour of robust regression used; there are many. 2. It's a good idea to compare robust regressions with the results of standard linear regression. 3. You need literature references explaining why P-values aren't present. 4. I think you malign your colleagues, who from my reading are knowledgeable about and sensitive to statistical issues. 5. Psychology and cognitive science aren't my fields, but Howard Wainer was writing about robust regression in psychology 40 years ago. 6. Be pleased if you are presenting work novel in your field. – Nick Cox Oct 14 '14 at 10:02
• Say library(robustbase) and look at the newer robust methods there, which come with more extensive summary methods. – kjetil b halvorsen Oct 9 '17 at 2:03

To expand on the advice of @kjetilbhalvorsen, here is an example of robust regression with the robustbase package. Note that the summary includes p-values for the effects and an r-squared value.

### Adapted from: http://rcompanion.org/handbook/I_11.html

if(!require(robustbase)){install.packages("robustbase")}
if(!require(car)){install.packages("car")}
if(!require(multcomp)){install.packages("multcomp")}


Toy data

DV=c(1,4,3,6,5,8,1,4,3,6,5,12,1,2,3,4,5,6,1,2,3,4,5,6)
IV1 = factor(c(rep("A",6), rep("B",6), rep("C",6), rep("D",6)))
IV2 = factor(rep(c("M","N"),12))


Fit robust model and view summary

library(robustbase)

model = lmrob(DV ~ IV1 + IV2)

summary(model)


A p-value for the effects can be determined using the anova.lmrob function.

### Effect of IV1

model.2 = lmrob(DV ~ IV2)

anova(model, model.2)

### Effect of IV2

model.3 = lmrob(DV ~ IV1)

anova(model, model.3)


The documentation for car:Anova doesn't mention lmrob objects, but at least for this example, it seems to match the application of the anova.lmrob function.

library(car)

Anova(model)


Likewise, the documentation for the multcomp package doesn't mention lmrob objects, but at least for this example, the results seem reasonable.

library(multcomp)

mc = glht(model,
mcp(IV2 = "Tukey"))