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:



The "linearity" assumption (more properly, "correct functional specification" assumption) states that the means of the conditional distributions of Y|X all fall on the function you specify.
A flat line is still a line, so lack of relationship does not imply violation of linearity.
Also, linearity is automatically satisfied for a two-level (binary) X, since the linear model imposes no restrictions on the mean function (a line always passes perfectly through two points having x separation).
Similarly, full dummy variable representations of categorical predictors also imply no restrictions, so linearity is automatically true there as well, as long as there is no other X in the model.
However, with multiple categorical predictors, all modeled with full dummy sets, there will be restrictions unless a saturated model having all possible interactions is modeled. Thus, violation of linearity refers to presence of interaction in this case.
