Solved – R – (why) does fitting a binomial glm to a 3-level factor work

binomial distributiongeneralized linear modellme4-nlmer

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.

Best Answer

Here's what's happening:

For binomial and quasibinomial families the response can also be specified as a factor (when the first level denotes failure and all others success) or as a two-column matrix with the columns giving the numbers of successes and failures.

Taken from the glm.fit docs.