# Multiple Linear Regression Assumptions

I have a question regarding the assumptions. I have a categorical predictor alongside three continuous predictors (moderators) and my dependent variable is continuous. I would like to understand how would one compute the assumptions or check for them in such a case. For the linearity assumption as I understand I would need to just check it for the moderator but for the others how would one do it? Is it variable based or model based? Thank you for all the help and answers in advance.

## 1 Answer

The usual approach to checking linearity is to plot the residuals vs fitted values for the model - if there is a nonlinear pattern, this may indicate that the linearity assumption does not hold.

Here is a very simple example in R:

set.seed(1)
N <- 1000
X <- rnorm(N, 10, 5)
Y <- 10 + X - X^2 + rnorm(N)
plot(lm(Y ~ X)) ...so we see a very pronounced nonlinear shape to the plot..

... but now if we include a quadratic term:

plot(lm(Y ~ X + I(X^2) )) ..and now we no longer have a nonlinear pattern.