Why the Level of a Predictor Matters
Student achievement data often contain measurements at two levels. An outcome such as whether a student meets a reading benchmark is recorded for each student, while some predictors, such as the percentage of certified teachers, describe the school. A school-level value may appear on every student’s row, but repeating it does not turn it into a student-level measurement. Keeping the levels clear is essential for interpreting what a fitted association compares.
This tutorial uses a hypothetical study of students nested within schools. The outcome is whether each student meets a specified achievement benchmark. The aim is to distinguish the levels of the predictors and describe the fitted association between a school characteristic and the outcome. An association in observational data is not, by itself, evidence that changing the school characteristic would change achievement.
Model and Interpretation
Let \(Y_{ij}=1\) if student \(i\) in school \(j\) meets the achievement benchmark, and \(Y_{ij}=0\) otherwise. Let \(X_{ij}\) be a student-level predictor, such as prior test score, and let \(Z_j\) be a school-level predictor, such as the percentage of certified teachers. A logistic random-intercept model is
Here \(p_{ij}=P(Y_{ij}=1\mid b_j,X_{ij},Z_j)\), and \(\operatorname{logit}(p)=\log\{p/(1-p)\}\). The school-specific random intercept \(b_j\) represents residual differences in baseline log odds among schools after accounting for the predictors. The coefficient \(\beta_2\) describes the change in conditional log odds associated with a one-unit increase in \(Z_j\), holding \(X_{ij}\) and \(b_j\) fixed. Thus, the units of \(Z_j\) must be stated before interpreting the coefficient.
For example, if \(Z_j\) is entered in percentage points, a one-unit increase means one percentage point, not a one-percent relative increase. The conditional odds ratio for a \(d\)-unit increase is \(\exp(d\beta_2)\). This is an odds comparison, not a probability difference. A probability difference depends on the starting probability and, in this model, on the random intercept and other covariates.
The school-level predictor is constant within each school. Consequently, its association is learned from differences across schools, while the model accounts for clustering of students within schools. The random-intercept assumption that \(b_j\) is independent of \(Z_j\) matters: if unmeasured school characteristics are systematically related to the predictor, the fitted coefficient may not represent the intended adjusted association. The coefficient is not a within-school comparison, because no within-school change in \(Z_j\) is observed.
Worked Example: Classifying Predictors in Student Records
Suppose a hypothetical data set has one row per student and includes school identifier, benchmark status, prior test score, and the school’s percentage of certified teachers. Three students attend School A, where that percentage is 72; two attend School B, where it is 61. Classify the variables by level.
Outcome. Benchmark status is a student-level outcome: each student has their own value, either 0 or 1.
Prior test score. This is a student-level predictor because scores can differ among students attending the same school. For instance, one student in School A might have a prior score of 48 points and another 62 points.
Percentage of certified teachers. This is a school-level predictor measured in percentage points. Each School A student’s row contains 72, and each School B student’s row contains 61. The repeated entries refer to the same school measurement; they are not independent measurements of teacher certification for each student.
School identifier. This records cluster membership. It is needed to link students to schools and represent the shared school intercept; it is not a quantitative predictor for which arithmetic on identifier codes has a meaningful interpretation.
Reading a Fitted School-Level Association
Consider a fitted model with prior score measured in 10-point units and \(Z_j\) measured as the school’s percentage of certified teachers in percentage points. Suppose the hypothetical output gives \(\hat{\beta}_2=0.0280\), with \(SE=0.0120\), for the school-level predictor. The school-level association is conditional on the included student predictor and on the random intercept in the model.
Worked Example: Interpreting the Coefficient per Percentage Point
For a one-percentage-point increase in the percentage of certified teachers, the fitted conditional log odds of meeting the benchmark change by 0.0280, with prior score and the random intercept held fixed. Exponentiating gives the conditional odds ratio:
The fitted odds are therefore about 1.028 times as large, or about 2.84% higher, per additional percentage point. The percentage increase in odds is \((1.028-1)\times100\%=2.84\%\). This is not a 2.84-percentage-point increase in the probability of meeting the benchmark.
For a 10-percentage-point contrast, the log-odds contrast is \(10(0.0280)=0.280\), so the conditional odds ratio is:
At fixed prior score and random intercept, the fitted odds for the student in a school with a value 10 percentage points higher are 1.323 times the odds at the lower value. This does not establish that an intervention increasing certification would cause that difference.
A Wald 95% confidence interval for the coefficient per percentage point is \(\hat{\beta}_2\pm1.96SE\):
For a 10-percentage-point contrast, multiply the endpoints by 10 and exponentiate:
Under the model and the Wald approximation, the interval is compatible with conditional odds from 1.046 to 1.674 times as large for a 10-percentage-point increase. It excludes 1, but its width shows appreciable uncertainty in the size of the association. The interval is not a statement that there is a 95% probability the fixed parameter lies within these particular limits.
The same odds ratio can correspond to different probability changes at different starting probabilities. For illustration, suppose the conditional probability at the lower school value is 0.400 for a particular student profile and random intercept. The corresponding odds are \(0.400/(1-0.400)=0.667\). Applying the fitted 10-point odds ratio gives the following probability at the higher value:
For this particular starting probability and profile, the fitted probability changes from 0.400 to about 0.469, a difference of 0.069, or 6.9 percentage points. This is an illustration of the conditional model, not a universal probability effect of a 10-point school-level difference.
Worked Example: Rescaling the School Predictor
Suppose the same school characteristic is recorded as a proportion from 0 to 1 rather than as a percentage from 0 to 100. A difference of 10 percentage points is a difference of 0.10 on the proportion scale. To preserve the fitted association, the coefficient must change scale.
The coefficient per unit of proportion is \(100(0.0280)=2.80\), because one whole unit of proportion corresponds to 100 percentage points. For a 0.10 increase, the log-odds contrast is \(2.80(0.10)=0.280\), and the odds ratio remains:
The fitted contrast is unchanged; only the numerical value and unit of the coefficient differ. Reporting 2.80 without saying that it is per one whole unit of proportion would be misleading, since a full-unit increase represents a 100-percentage-point difference. A useful report states both the coefficient’s scale and a meaningful contrast, such as the odds ratio per 10-percentage-point increase.
Diagnostics, Alternatives, and Limits
Before interpreting a school-level coefficient, check that the data and model support the intended comparison. These checks are especially important because a school-level value is repeated in student records.
- Verify the measurement level and coding. Confirm that the predictor is constant within school and that it is recorded in the stated units. If it varies among students within a school, it may instead be a student-level measurement or a student-level report of a school feature.
- Check the number and spread of schools. The school-level association is informed by the number of distinct schools and the range of their predictor values, not simply by the total number of student rows. A narrow range or few schools can make the estimate imprecise.
- Inspect the fitted model and uncertainty. A large standard error, a wide interval, or sensitivity to a small number of schools signals that the estimate should be described cautiously. Check convergence and whether estimated random-intercept variation is plausible for the data.
- Consider functional form and omitted structure. A single linear coefficient on the log-odds scale assumes a constant log-odds change per unit across the observed range. A curved relationship, influential schools, or an omitted school characteristic related to both \(Z_j\) and achievement can undermine that summary.
A common mistake is to treat every repeated student-row entry for a school predictor as a new independent observation. For example, if one school’s certification percentage appears on 100 student rows, there are still only 100 student outcomes but only one distinct school-level value for that school. The correction is to model school clustering and recognize that information about a school-level association comes from variation across schools. The GLMM does not create additional independent school measurements by repeating the value.
A standard logistic regression that treats all student outcomes as independent ignores the shared school structure and may give inappropriate uncertainty estimates. An analysis of school-level summaries instead treats schools as the analysis units, but discards student-level detail and may be unsuitable when the outcome and covariates vary among students. The GLMM retains student records while representing a shared school intercept. These approaches answer related but not identical questions, and none automatically removes confounding or makes an observational association causal.
The random-intercept GLMM also has limits. Its school-level coefficient relies on the specified conditional mean structure and on assumptions about the random effects, including their independence from included predictors. If those assumptions are implausible, the coefficient may have a different interpretation or be biased for the intended association. The coefficient describes a model-based conditional association; it does not by itself quantify an intervention effect, nor does it describe every way schools may differ.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- A student-level data file repeats each school’s mean class size on every student row. Is mean class size a student-level or school-level predictor? What source of variation informs its coefficient?
- A fitted coefficient for school percentage of certified teachers, measured in percentage points, is 0.015. What is the conditional odds ratio for a 10-percentage-point increase?
- Why is it incorrect to say that an odds ratio of 1.30 means the probability of meeting the benchmark increases by 30 percentage points?
- There are 2,000 students but only 12 schools, and the school-level predictor varies little among the schools. What should be said about the precision and information supporting its association?
Solutions. (1) Mean class size is a school-level predictor because it is measured for each school and shared by its students. Its coefficient is informed by differences in mean class size across schools, with the clustering represented in the model; repeating the value does not add distinct school-level measurements. (2) The log-odds contrast is \(10(0.015)=0.150\), so the conditional odds ratio is \(\exp(0.150)=1.162\). The fitted odds are about 1.162 times as large for the stated contrast, holding the other model terms fixed. (3) An odds ratio compares odds, not probabilities. The probability change depends on the starting probability and model conditions, so it cannot be stated as a fixed 30-percentage-point increase. (4) The large student count does not substitute for a large number of distinct schools. With only 12 schools and little predictor variation across them, the school-level association may be imprecise and sensitive to individual schools; report its uncertainty and avoid overstating the evidence.