I have a list of predictor variables to put in to a logistic regression model. How I know that should I do a simple logistic regression (using glm function in R) or a mixed effect logistic regression (using glmer function in R) analysis?


More information would help us discern the structure of your data. Yet generally speaking you should use glmer if your data are correlated because of its nested structure. For example, you obtained the binary outcome variable:

  1. repeatedly from the same set of subjects. In this case, observations are nested within subjects and are correlated; or
  2. from students nested within classrooms. Then the observations taken from the students within each classroom are said to be correlated.

If your data are obtained from subjects only once, and they are not nested within any grouping/structural variables, you should use glm.


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.