In the example datasets that we used in this chapter, we have seen that some observations might threaten the reliability of our results, because of the deviations of their residuals from a normal distribution. The Shapiro test performed on the residuals of model1
(nurses
dataset) has shown that the distribution of the residuals was not significantly different from a normal distribution. However, let's be particularly cautious and analyze the same data using robust regression.
As we mentioned earlier, robust regression does not require the residuals to be normally distributed, and therefore, fits our purpose. We will not explore the algorithm. For details about this, the reader can consult Robust Regression in R by Fox and Weisberg (2012). Here, we simply perform robust regression using the rlm()
function of the MASS
package. Let's first install and load it:
install.packages("MASS"); library(MASS) model1.rr = rlm(Commit ~ Exhaus + Depers + Accompl, data = nurses) summary(model1...