# Performing and interpreting a logistic regression using ordered variables in R

I'm currently working on my first larger project with self-collected data and only few guidelines. My dataset contains 29 variables, all of which are categorical and most of which are ordered (with 2 to 6 levels).

My aim is to perform several logistic regressions, and due to the ordered nature of (most of) my data I first stumbled across the polr function in the MASS package. However, I discovered that it can only be used if the dependent variable has at least 3 levels (is there a practical reason for this?), and so I hope to be able to use glm() in those cases where it has only 2. For now, I decided to work with a random sample (60% of my 4400 observations).

For my first regression, the dependent variable has 2 levels (no/yes), while the five predictors I chose are all ordered and have 6, 3, 2 (no/yes), 4 and 5 levels respectively. Running

summary(glm(P05 ~ P03 + P06 + P07 + P10 + P17, data = DataTrain, family = binomial("logit")))


produces the following output:

Call:
glm(formula = P05 ~ P03 + P06 + P07 + P10 + P17, family = binomial("logit"), data = DataTrain)

Deviance Residuals:
Min       1Q   Median       3Q      Max
-3.2841  -0.1813   0.0906   0.3962   3.0173

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept)                3.24548   71.40502   0.045  0.96375
P03.L                      8.02192  256.03496   0.031  0.97501
P03.Q                      4.18870  233.72680   0.018  0.98570
P03.C                      3.59522  159.66645   0.023  0.98204
P03^4                      2.17832   80.96710   0.027  0.97854
P03^5                      1.30158   26.99216   0.048  0.96154
P06.L                      3.15496    0.16009  19.707  < 2e-16 ***
P06.Q                     -1.21995    0.20944  -5.825 5.72e-09 ***
P07.L                      0.31185    0.11018   2.830  0.00465 **
P10.L                      0.98932    0.20832   4.749 2.04e-06 ***
P10.Q                      0.26703    0.29000   0.921  0.35716
P10.C                     -0.08688    0.34696  -0.250  0.80227
P17.L                      1.18209    0.38270   3.089  0.00201 **
P17.Q                      0.14912    0.34263   0.435  0.66339
P17.C                      0.23543    0.32997   0.713  0.47554
P17^4                     -0.54607    0.26883  -2.031  0.04223 *
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

Null deviance: 3197.3  on 2316  degrees of freedom
Residual deviance: 1163.1  on 2301  degrees of freedom
(310 observations deleted due to missingness)
AIC: 1195.1

Number of Fisher Scoring iterations: 13


Three things about this are confusing me. First, the inclusion of the .Q, .C, ^4 and ^5 terms although I didn't specify this anywhere. In some tutorial I found (don't know if I'm allowed to link to other sites), they use one 4-level categorical (and two continuous) predictor, and instead of all those higher powers they receive three coefficients, one for level 2, 3 and 4 each.

Second, they then proceed to use wald.test() to determine the overall significance of the categorial variable across all levels. While I can technically run the function using the different "power coefficients" I obtained instead of "level coefficients" like in the tutorial, I'm unsure if the interpretation remains similar, or if it even makes sense methodically.

Third (I didn't want to work on this before the other two issues have been sorted out, so I haven't tried this myself yet), they use odd ratios as an intuitive way to interpret their results. I'm 99.9% certain that even if I were able to calculate them using my "power coefficients", this would be incorrect methodically.(?) So I assume the main problem are those unexpected "power coefficients".

That's when I went through several other posts on here and found this one: Interpretation of .L & .Q output from a negative binomial GLM with categorical data

The answer there says the "power coefficients" are a direct consequence of the variables being ordered, and while I COULD treat my variables as unordered, I wonder whether I'm actually allowed to do that, given that there IS indeed a natural order. If yes, does the interpretation of unordered variables have any less value? Is there any conclusion that I would be able to draw from ordered variables but not from unordered ones? Otherwise, what else am I supposed to do?

I'd appreciate your help! Thanks!