<p>You do not have to check the assumption of linearity when using categorical predictors, because the notion of linearity is not defined for them. We can define linearity such as <span class="math-container">$y=a+bx$</span> for a pair of numerical variables <span class="math-container">$(y,x$</span>). However, the equation does not make sense if <span class="math-container">$x$</span> is not numerical. What would it mean to say the relationship is linear between a numerical vector <span class="math-container">$y$</span> denoting the yearly salary and a categorical vector <span class="math-container">$x$</span> denoting a person's name (Alex, Bob, Christopher, ...)? Or between the price of a car <span class="math-container">$y$</span> and the car's color <span class="math-container">$x$</span> (white, red, blue, ...)?</p>

CC BY-SA 4.0
2023-03-06T13:10:45.900Z
2023-03-06T13:10:45.900Z
Richard Hardy
<p>I have a logit model predicting the outcome 1 or 0.</p>
<p>My predictors are sociodemographics such as gender, income - intervals into categories like a: 1000-5000 usd, b:5000-15000 usd. etc, having a car, being student of high school - a, uni -b, elderly c.. ETC.</p>
<p>I have found several assuptions that need to be met for a logit model. My concern is  linearity of independent variables and log odds. I have found that the boxTidwell test is a way to go, but it only works for numerical variables.</p>
<p>I have also found that when u have only binary predictors you don´t need to check for this assumption. How it is when I have this cathegorical predictors such as income that is not continious? There is not any tests, do I have to check this assumption ?</p>
<p>Thank in advance!</p>

<econometrics><r><logit>
Assumptions of Logistic Regression Cathegorical predictors only
vojta9
# Assumptions of Logistic Regression Cathegorical predictors only

(Asked by: username_0 on 2023-03-04)

I have a logit model predicting the outcome 1 or 0.

My predictors are sociodemographics such as gender, income - intervals into categories like a: 1000-5000 usd, b:5000-15000 usd. etc, having a car, being student of high school - a, uni -b, elderly c.. ETC.

I have found several assuptions that need to be met for a logit model. My concern is linearity of independent variables and log odds. I have found that the boxTidwell test is a way to go, but it only works for numerical variables.

I have also found that when u have only binary predictors you don´t need to check for this assumption. How it is when I have this cathegorical predictors such as income that is not continious? There is not any tests, do I have to check this assumption ?

Thank in advance!

**Tags:** econometrics, r, logit


---

## 1 answers

### Answer by username_1 on 2023-03-06. Score: 1 | Accepted answer

You do not have to check the assumption of linearity when using categorical predictors, because the notion of linearity is not defined for them. We can define linearity such as $y=a+bx$ for a pair of numerical variables $(y,x$). However, the equation does not make sense if $x$ is not numerical. What would it mean to say the relationship is linear between a numerical vector $y$ denoting the yearly salary and a categorical vector $x$ denoting a person's name (Alex, Bob, Christopher, ...)? Or between the price of a car $y$ and the car's color $x$ (white, red, blue, ...)?


---

