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.

  • $\begingroup$ 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." $\endgroup$
    – Donnie
    Oct 3, 2015 at 15:04
  • $\begingroup$ @Donnie all of the variables are factors, including the dependent variable, which can take on one of three levels. $\endgroup$
    – Jojanzing
    Oct 3, 2015 at 15:10
  • $\begingroup$ I've updated the question to better reflect this. $\endgroup$
    – Jojanzing
    Oct 3, 2015 at 15:12

1 Answer 1


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.