1
$\begingroup$

Can we use ordinal/multilevel predictors directly into binary logistic regression model?

I guess not.

we usually here convert them to multiple predictors to have values 1/0 for each category.

Also if we have a variable with say 20 levels(e.g. sectors like 'energy' 'IT' 'telecom') or factors, should we created 20 variables with values 1/0 for each type or is there better way?

$\endgroup$
2
$\begingroup$

As the other answers explain, dummy coding works in logistic regression. This would only necessitate 19 dummy variables in your case. Dummy coding is effective for nominal data but suboptimal for ordinal data. Penalized regression is preferable for predictive modeling; it reduces overfitting by smoothing differences in slope coefficients for dummy variables corresponding to adjacent ranks. See Gertheiss and Tutz (2009) for an overview of penalized regression for ordinal predictors; section 6 covers applications in logistic regression. I've discussed penalized regression in other contexts here:


Reference
Gertheiss, J., & Tutz, G. (2009). Penalized regression with ordinal predictors. International Statistical Review, 77(3), 345–365. Retrieved from http://epub.ub.uni-muenchen.de/2100/1/tr015.pdf.

$\endgroup$
0
$\begingroup$

No, only 19 variables will be created and any good stat package will do it for you. However, with so many levels you will need a large N. Otherwise you might have to combine levels in some sensible way.

$\endgroup$
0
$\begingroup$

You can use ordinal. If you want them to be treated as levels, tell that to your statistical package. In stata, you would include the variable with preceding "i.", as in i.MyLevelVariable. Note that you need to leave a base category out, so your should only create 19 predictors.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.