Two Questions About an Effect
For repeated or clustered responses, a model can describe how the mean changes with a covariate in two different ways. It can compare responses after averaging over the distribution of subjects, or compare responses conditional on a subject’s individual-level heterogeneity. These are different estimands: the first is population-average, while the second is subject-specific.
The distinction matters because averaging a nonlinear conditional mean does not generally preserve its form or its coefficients. Thus, two models can use the same covariate and still attach different meanings—and different numerical values—to the coefficient of that covariate.
The law of iterated expectations links the two:
In words, the marginal mean is obtained by averaging the conditional mean over the distribution of heterogeneity given the covariates. If \(B_i\) is independent of \(X_i\), this is an average over one common distribution of \(B_i\). If they are associated, the distribution to average over can vary with \(x\); ignoring that dependence can change the marginal relationship.
A subject-specific effect is not necessarily a causal effect for a particular person. It is a conditional model contrast. A causal interpretation needs additional assumptions about treatment assignment, confounding, consistency, and the target population. Likewise, population-average describes the averaging involved; it does not, by itself, establish causality.
Worked Example: A Logistic Effect Changes After Averaging
Worked Example: A Logistic Effect Changes After Averaging
Suppose \(X_i\) is a binary covariate and \(Y_i\) is a binary response. Consider the subject-specific logistic model
where \(B_i\) is independent of \(X_i\), taking values \(\log 3\) and \(-\log 3\), each with probability \(1/2\). Set \(\beta_0=0\) and \(\beta_1=\log 2\). At either fixed value \(b\), increasing \(x\) from 0 to 1 multiplies the conditional odds by \(e^{\beta_1}=2\).
For \(x=0\), the two conditional success probabilities are
Averaging gives \(P(Y_i=1\mid X_i=0)=(3/4+1/4)/2=1/2\), with marginal odds \(1\).
For \(x=1\), the conditional log-odds are \(\log 2+\log 3=\log 6\) and \(\log 2-\log 3=\log(2/3)\). The corresponding probabilities are \(6/7\) and \(2/5\). Therefore
The marginal odds at \(x=1\) are \((22/35)/(13/35)=22/13\). Consequently, the marginal odds ratio comparing \(x=1\) with \(x=0\) is \(22/13\), approximately \(1.69\), whereas the subject-specific odds ratio is \(2\). The same covariate has a conditional log-odds coefficient \(\log 2\), but its marginal log-odds contrast is \(\log(22/13)\).
This calculation illustrates a central feature of logistic models: averaging probabilities over heterogeneity is not equivalent to averaging log-odds. In this example, the population-average association is closer to an odds ratio of 1 than the conditional association. This is an example of the noncollapsibility of the odds ratio: even though \(B_i\) is independent of \(X_i\), marginalizing over \(B_i\) changes the odds ratio. It is not evidence of confounding by \(B_i\).
When the Slopes Agree: A Linear Random-Intercept Model
The difference is not inevitable. In a linear model with an identity link and a random intercept, averaging can leave the covariate slope unchanged. The conditions matter: in particular, the random intercept must have mean zero conditional on the covariates.
At fixed \(x\) and \(B_i\), the model gives \(E[Y_{ij}\mid X_i=x,B_i]=\alpha+\beta x+B_i\).
Apply the law of iterated expectations, which is applicable because the conditional mean is integrable:
The marginal mean has slope \(\beta\), as claimed. If \(E[B_i\mid X_i=x]\) instead varies with \(x\), the marginal mean includes that variation and need not have slope \(\beta\). A random-intercept model with \(B_i\) independent of \(X_i\) and \(E[B_i]=0\) satisfies the stated condition. Independence is sufficient here, but the conditional mean-zero condition is what the proof uses. □
Worked Example: Equal Slopes Under Mean-Zero Heterogeneity
Suppose \(E[Y_{ij}\mid X_i=x,B_i]=10+3x+B_i\), and \(B_i\) is independent of \(X_i\) with mean zero. At a subject whose random intercept is \(b=2\), the conditional mean is \(12+3x\). Increasing \(x\) by one unit increases that subject’s conditional mean by 3.
For the population, averaging \(B_i\) gives \(E[Y_{ij}\mid X_i=x]=10+3x+E[B_i]=10+3x\). The population mean also increases by 3 per unit of \(x\). The intercepts in the conditional and marginal expressions coincide because the random intercept has mean zero; if its mean were not zero, the marginal intercept would shift by that mean, although the slope would still agree under independence.
Nonlinear Means Can Change Even the Marginal Slope
For a nonlinear conditional mean, integrating over heterogeneity can change more than the intercept. A log-link model makes this explicit. Let \(X_i=x\) be scalar, and suppose \(B_i\) is a normally distributed random intercept and slope:
Assume \((B_{0i},B_{1i})\) is jointly normal with mean zero, independent of \(X_i\), and has variances \(\tau_0^2\) and \(\tau_1^2\) and covariance \(\tau_{01}\). The exponent’s random part \(B_{0i}+xB_{1i}\) is normal with mean zero and variance \(\tau_0^2+2x\tau_{01}+x^2\tau_1^2\). For a zero-mean normal variable \(Z\) with variance \(v\), its moment-generating function gives \(E[e^Z]=e^{v/2}\). Hence
If \(\tau_1^2>0\), the log of this marginal mean contains a quadratic term in \(x\), even though the conditional linear predictor is linear in \(x\). Thus one constant subject-specific coefficient \(\beta\) does not generally correspond to one constant population-average log-mean slope. This marginal distribution is a mixture over random effects; the derivation concerns its mean and does not assert that the marginal response itself is Poisson.
Worked Example: A Random Intercept Under a Log Link
As a simpler special case, suppose \(E[Y_{ij}\mid X_i=x,B_i]=\exp(\alpha+\beta x+B_i)\), where \(B_i\) is independent of \(X_i\) and \(B_i\sim N(0,0.25)\). The normal moment-generating function gives \(E[e^{B_i}]=e^{0.25/2}=e^{0.125}\). Therefore
The conditional and marginal log-mean slopes both equal \(\beta\), but the marginal log-mean intercept is \(\alpha+0.125\). The agreement in slope follows from the random-intercept structure and independence; it should not be generalized to random slopes or to nonlinear links without checking the averaging calculation.
How to Read the Coefficient
Before interpreting a fitted coefficient, identify which mean the model specifies. A conditional model includes heterogeneity in the conditioning set; a marginal model describes the mean after averaging it out. The coefficient’s interpretation then follows from that model and its link. For a binary logistic model, for example, the subject-specific coefficient describes a conditional log-odds contrast at fixed heterogeneity, while a marginal contrast is computed from probabilities averaged over heterogeneity.
The same named covariate does not make these coefficients interchangeable. They may coincide under special structures, as in the linear random-intercept result, or differ, as in the logistic example. Even when their numerical values agree, their target interpretations remain conditional and marginal, respectively.
Common Mistake
- Wrong reasoning: “The covariate is the same in both models, so its coefficient must represent the same effect.”
- Correction: The coefficient belongs to a specified conditional or marginal mean. To relate them, average the conditional mean over the distribution of heterogeneity and inspect the resulting function. Nonlinear averaging can alter the coefficient interpretation or the form of the mean, even when heterogeneity is independent of the covariate.
- Another caution: A subject-specific coefficient is not automatically an individual causal effect. It conditions on modeled heterogeneity; causal conclusions require further design and identification assumptions.
Check Your Understanding
For each question, distinguish the conditioning set from the target mean.
- In one sentence, define the difference between a population-average mean and a subject-specific mean.
- In the logistic worked example, what were the conditional and marginal odds ratios, and why were they different?
- State the condition on \(E[B_i\mid X_i=x]\) used to show equality of slopes in the linear random-intercept result.
- In the log-link random-intercept example, what changed after averaging, and what remained the same?
- Why does independence of heterogeneity and a covariate not guarantee that a marginal odds ratio equals a conditional odds ratio?