# Testing the linearity assumptions for categorical predictors

Me and my friend are currently writing our final essay but we are having some problems with our analysis…

We are doing an hierarchical multiple regression, and we has some categorical predictors (like two-levels variables as biological and non-biological, and some with more levels like grade). Before doing this we controlled for several assumptions, the linearity assumption included. We have some issues with our linearity plots that we do not understand.

Judging from our plots, there is no linear relationship between some of our predictor variables and the dependent variable, although, in our performed regression analysis the variable have a significant association.

How can we understand this? Should we take these predictors out of the regression, or can we still include them? And if we can include them, what is the reasoning for this?

We would be so greatful if someone could help us with this! :)

Here are two picture of two of the scatterplots, as examples:

• Welcome to Cross Validated! How would you expect a linear relationship to look in plots like you gave?
– Dave
Commented Nov 25, 2022 at 14:04
• More linear, like a diagonal stretch i assume. Just so the linearity-assumption that the regression requires is met Commented Nov 25, 2022 at 20:23
• Consider providing more information about the data you are analyzing and the questions you are trying to answer, incl. what's PSE, creIR and Power? Also, the first scatterplot suggests the relationship between Power and PSE may be non-linear (this could be addressed by transforming Power). In the second scatterplot there is a lot of overplotting; it may be more instructive to look at the average PSE for the two levels of creIR. Commented Dec 2, 2022 at 23:29