# R - (why) does fitting a binomial glm to a 3-level factor work?

I am trying to determine which of several independent variables {A,B,C} best predicts a subject's response R, which can be one of 3 choices, {high, medium, low}.

As the dependent variable is multinomial i.e. not binomial, a binomial logistic regression is not suitable. However, using the lme4 package to fit a glm with family = 'binomial' to the data runs without error or warning, and correctly identifies that independent variable B is the best predictor.

Is this a lucky coincidence, or is the call to glm() automatically fitting multiple binomial regressions to the data (one for each binary combination), or is it something else entirely? Any comments are welcome.

• Do you have reproducible code? For both glmer() and glm(), I get the error "Error in eval(expr, envir, enclos) : y values must be 0 <= y <= 1." – Donnie Oct 3 '15 at 15:04
• @Donnie all of the variables are factors, including the dependent variable, which can take on one of three levels. – Jojanzing Oct 3 '15 at 15:10
• I've updated the question to better reflect this. – Jojanzing Oct 3 '15 at 15:12

Taken from the glm.fit docs.