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.


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:

N <- 1000
X <- rnorm(N, 10, 5)
Y <- 10 + X - X^2 + rnorm(N)
plot(lm(Y ~ X))

enter image description here

...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) ))

enter image description here

..and now we no longer have a nonlinear pattern.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.