Robust Regression Analysis in R

Arndt Regorz, Dipl. Kfm. & M.Sc. Psychology, 09/30/2021

(Note: When you click on this video you are using a service offered by YouTube.)

The following annotated code runs a robust regression in R

You will need the following R packages, each of which must be installed once before use, e.g. install.packages("robustbase"):

  • robustbase
  • olsrr

R code


# Dataframe from package robustbase

# Ordinary least squares regression
fit.reg <- lm(nrAdvE ~ BMI + height, data= CrohnD)

# Robust regression
# IMPORTANT: N should be >= 100!
fit.rob <- lmrob(nrAdvE ~ BMI + height, data= CrohnD)

# Outlier analysis

Additional information about the MM-estimator:

The MM-estimator, on which the robust regression in the robustbase package is based, was introduced in this paper:

Yohai, V. J. (1987). High breakdown-point and high efficiency robust estimates for regression. The Annals of Statistics, 15(2), 642-656.

Additional tutorials about robust statistical methods with R