0
$\begingroup$

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.

Any assistance or answers would be greatly appreciated.

Thanks, Shawn

$\endgroup$
  • $\begingroup$ Please share output so we can more easily interpret what you are looking at. $\endgroup$ – robin.datadrivers Jun 2 '17 at 19:02
0
$\begingroup$

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
$\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.