Can we use ordinal or multilevel predictors directly into logistic regression? 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?
 A: 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:


*

*Effect of two demographic IVs on survey answers (Likert scale)

*Continuous dependent variable with ordinal independent variable

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.
A: 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.
A: 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.
