Do I need to test for assumptions before linear regression if I get good predictive results? Does the good results imply the assumptions are satisfied?
-
3$\begingroup$ What is the goal of the modeling? If you only want accurate predictions, then, in some sense, inspecting for accurate predictions is the test. // Pre-testing can throw off subsequent testing, since you have multiple tests. Further, testing cannot tell you if an assumption is violated but just barely (in which case, one might argue that the assumption is practically satisfied). $\endgroup$– DaveAug 4, 2021 at 12:51
1 Answer
No, you can have strong predictive performance yet still violate assumptions. Let's do an R simulation where the usual assumptions are violated, yet predictive performance, measured with $R^2$, $R^2_{adj}$, and $MAE$, is strong.
set.seed(2021)
N <- 1000
a <- -2
b <- 2
x <- seq(a, b, (b - a)/(N - 1))
y <- 10*x + x^3 + rnorm(N, 0, 0.1)
plot(x, y)
L <- lm(y ~ x)
summary(L)$r.squared
summary(L)$adj.r.squared
mean(abs(predict(L) - y))
The regression $R^2 = 0.992864463374598$, $R^2_{adj} = 0.9928573135383$, and $MAE = 1.0491595205924$. The predictive performance appears to be pretty good; we explain most of the variability and tend to miss the true value by only about $1$ unit. However, there is a bad violation of assumptions. Look at the residual plot via plot(L)
.
-
$\begingroup$ Thinking another minute, is this a matter of a violation of linearity, or is the issue with dependence in the residuals? Either way, a standard assumption is violated, despite the strong performance. $\endgroup$– DaveAug 4, 2021 at 15:43