I'm building a logistic regression model in R using glm(y ~ x1 + x2 + x3 + x4, data = train.set, family = binomial(link = 'logit'))
. Among 4 predictors x1, x2, x3, x4
, they all are categorical. However x1, x2, x3
are on a scale of 0 to 10, and x4
is binary (0 or 1).
My question is how should i properly pre-process x4
? I'm asking because I know it is a really important variables in terms of prediction, but it's showing a pretty low importance in the summary()
due to the fact that it's on a different scale as the rest of predictors.
Could someone who has experienced similar situation share your approach? Thanks a lot!
edit: all predictors x1, x2, x3, x4
are factors. I do understand that as long as they are all factors, it shouldn't matter what values each predictors they have. but we expect x4
to be a more important predictors, but varImp
shows the opposite.
x4
(as well as the other predictors) afactor
variable ? $\endgroup$factor
s. $\endgroup$