# Linearity assumption for logistic regression (very simple question plz help me)

#### Heebyungkoh

##### New Member
Hi.
Do I have to check linearity assumption of logistic regression (Log odds of outcome with continuous variable)
using graph of predicted logodds (by logistic regression) and continuous variable
Or
using graph with real logodds and continuous variable ?
I think the latter is right.
In univariate setting, the first one should be always perfect linear. Is it right?

Best.

Last edited:

#### Dason

How do you plan on defining the real logodds for any given value of x?

#### Heebyungkoh

##### New Member
How do you plan on defining the real logodds for any given value of x?
For example,
If at age 20, total 100 observation, 50 event and 50 non-event
Log(0.5/0.5) would be real logodds of age20

If At age 30, total 100 observation, 10 event and 90 non-event
Log(0.1/0.9) would be real logodds of age30

If At age 40, total 100 observation, 70 event and 30 nonevent
Log(0.7/0.3) would be real logodds of age 40

That pattern would be nonlinear.

But if I get a predicted logodds by logistic regression (logistic outcome age) and connected , it would be always perfectely linear unless another variable is added.

The term real logodds and predicted logodds is just for explanation