# Ordinal Logistic Regression model in R [closed]

I am running an ordinal logistic regression model in R. My dependent variable is a categorical variable with 4 levels. I have six independent variables. When I run the ordinal logit, one of the six independent variables gets split into two with each having its own coefficient.

I was wondering why this could be happening?

## closed as unclear what you're asking by mdewey, Michael Chernick, mkt, jpmuc, Peter Flom♦Sep 14 at 13:39

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Please share output so we can more easily interpret what you are looking at. – robin.datadrivers Jun 2 '17 at 19:02
• Is that IV categorical? – Peter Flom Sep 14 at 13:39

one of the six independent variables gets split into two

If you check this independent variable is that a factor and has three levels? If yes, it is called categorical variable coding. Details can be found here.

Here is a simple demo. Note, the cyl is number of cylinders in a car, and it is a factor has 3 levels.

summary(glm(am~wt+factor(cyl),mtcars,family=binomial()))

Call:
glm(formula = am ~ wt + factor(cyl), family = binomial(), data = mtcars)

Deviance Residuals:
Min        1Q    Median        3Q       Max
-1.83559  -0.29948  -0.04014   0.19966   1.98747

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept)    20.853      8.032   2.596  0.00942 **
wt             -7.859      3.055  -2.573  0.01009 *
factor(cyl)6    3.105      2.425   1.280  0.20042
factor(cyl)8    5.379      3.201   1.681  0.09281 .
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

Null deviance: 43.230  on 31  degrees of freedom
Residual deviance: 14.661  on 28  degrees of freedom
AIC: 22.661

Number of Fisher Scoring iterations: 7