I have a question about the differences between two forms of logistic regression.
Let's say that I have data that is collected with some nesting. For concreteness, we'll say that I've got data across a few thousand elementary schools. For each school, I have data on each of the classrooms. My outcome is the number of students in each classroom who received some type of disciplinary action in an academic year. So the outcome is a number of binomial counts, where I have the number of students who were disciplined and the total number of students in each classroom. My 'explanatory variable' is measured at the level of school. We'll say that the explanatory variable is some kind of school-level socioeconomic status (SES).
My first instinct would be to estimate a multilevel model. In lmer syntax, it would look something like this:
m <- glmer(cbind(n_disciplined, n_students) ~ SES + (1|school), family='binomial')
But perhaps I can save myself some trouble by just aggregating the counts of the number of students disciplined and the total number of students up to the level of school. So instead of a multilevel model, I can just estimate a standard logistic regression:
m <- glm(cbind(tot_disciplined, tot_students) ~ SES, family='binomial')
If I'm only interested in how SES is associated with disciplinary differences across schools, is there a reason why I should use the former, more complicated model instead of the latter? Typically, I would avoid aggregating the data, but I'm interested in if doing so would change either the estimated values, or the conclusions I would/could draw from the model fits.