We have seen that the residuals should be homoscedastic (the variance should be the same), and in case that doesn't happen, the distribution of the t-values is no longer t-Student. The relevant question is naturally how we can fix this. The so-called sandwich estimators from the sandwich package allow us to use heteroscedasticity-robust standard errors. With this correction, we can still use the t-tests as usual. The best thing is that this is easy to implement.
Implementing sandwich estimators
Getting ready
The sandwich and the lmtest packages need to be installed via install.packages().