Tutorials › Generalized Linear Mixed Models (GLMM) › Presenting Random-Slope Results in a Treatment Study

Software and Case Studies · Tutorial 694 of 698

Presenting Random-Slope Results in a Treatment Study

Present the overall conditional treatment estimate alongside the estimated spread of site-specific treatment associations, without confusing the two.

Intermediate 10 min read

What You'll Learn

  • State a random-intercept, random-treatment-slope model for a binary outcome.
  • Interpret the fixed treatment coefficient and its odds ratio for a typical site.
  • Describe random-slope variation on the log-odds and odds-ratio scales.
  • Calculate a model-implied range of site treatment associations and explain its limits.
  • Distinguish random-slope results from random-intercept-only and site-specific fixed-effect approaches.
  • Identify design and model checks that matter when presenting treatment variation across sites.

Why Report the Treatment Slope Separately?

In a site-based treatment study, a single treatment estimate can conceal an important feature of the fitted model: the treatment association may differ across sites. A random-slope GLMM represents this pattern directly. Reporting it well means keeping two results distinct: the fixed treatment coefficient, which summarizes the model’s central conditional association, and the random-slope variation, which describes how site-specific treatment associations vary around that center.

The examples below use a hypothetical study of a binary clinical outcome. Treatment and control participants are observed within each site. A lower probability of the outcome is favorable. The outcome and study are illustrative, not real.

The Model and Its Interpretation

Let \(Y_{ij}\) be the binary outcome for participant \(i\) in site \(j\), and let \(T_{ij}=1\) indicate treatment and \(T_{ij}=0\) indicate control. A random-intercept, random-treatment-slope logistic model is

$$ Y_{ij}\mid b_{0j},b_{1j}\sim \operatorname{Bernoulli}(p_{ij}),\qquad \operatorname{logit}(p_{ij})=\beta_0+\beta_T T_{ij}+b_{0j}+b_{1j}T_{ij}. $$

Here \(\beta_T\) is the fixed treatment coefficient; \(b_{1j}\) is site \(j\)'s deviation from that coefficient. The site-specific conditional treatment log odds ratio is therefore \(\beta_T+b_{1j}\), and its odds ratio is \(\exp(\beta_T+b_{1j})\). The fixed-effect odds ratio \(\exp(\beta_T)\) is the conditional odds ratio at \(b_{1j}=0\), the center of the modeled random-slope distribution. It is not, in general, a population-averaged odds ratio.

Definition: In a random-treatment-slope model, the fixed treatment coefficient describes the center of the site-specific conditional treatment coefficients. The random-slope standard deviation describes their between-site spread on the link scale. These are different quantities and should be reported separately.

The usual distributional specification is

$$ \begin{pmatrix}b_{0j}\\b_{1j}\end{pmatrix} \sim N\left[ \begin{pmatrix}0\\0\end{pmatrix}, \begin{pmatrix}\tau_0^2&\rho\tau_0\tau_1\\ \rho\tau_0\tau_1&\tau_1^2\end{pmatrix} \right], $$

independently across sites. The intercept and slope may be correlated; \(\tau_1\) is the standard deviation of the site treatment deviations on the log-odds scale. Conditional on the random effects and included predictors, outcomes are assumed independent Bernoulli observations with probabilities correctly described by the model. The link and fixed-effect structure must be adequate, and the random-effects distribution is assumed to be reasonably represented by the bivariate normal specification.

The design also matters. Treatment must vary within enough sites to distinguish site-specific treatment slopes from site baselines. If every site contains only treatment or only control participants, the site treatment contrast is not observed within site, and the random-slope interpretation relies on much stronger between-site comparisons. Sites should also be independent sampling or assignment units for the stated model, and the fitted model should converge without evidence that the variance or correlation estimates are at a boundary.

Worked Output: Fixed Treatment Estimate and Site Variation

Worked Example: Reporting a Fitted Treatment Model

Suppose a hypothetical study includes 12 sites, each with participants in both arms. A logistic random-slope model gives \(\hat{\beta}_0=-1.20\), \(\hat{\beta}_T=-0.55\), and \(SE(\hat{\beta}_T)=0.20\). The estimated random-intercept standard deviation is \(0.60\), the random-treatment-slope standard deviation is \(0.42\), and their estimated correlation is \(-0.25\). Assume the model converged, there are no separation or gross fit concerns, and site-level treatment variation is supported by the design.

Fixed treatment association. The estimated conditional log odds ratio is \(-0.55\). Exponentiating gives

$$ \widehat{OR}_{\text{typical site}}=\exp(-0.55)=0.5769\approx0.577. $$

For a site at the center of the random-slope distribution, the estimated treatment odds are about \(0.577\) times the control odds, conditional on the model and other included predictors. This is a 42.3% lower estimated odds, since \(1-0.577=0.423\); it is not a 42.3% lower probability.

A Wald 95% confidence interval on the fixed log-odds coefficient is

$$ -0.55\pm1.96(0.20)=[-0.942,-0.158]. $$

Exponentiating both endpoints gives an odds-ratio interval \([\exp(-0.942),\exp(-0.158)]=[0.390,0.854]\). Under the model and the Wald approximation, this interval is a range of plausible values for the central conditional treatment odds ratio. It is not an interval for the spread among sites.

Variation across sites. The estimated slope SD of \(0.42\) is on the log-odds scale. It does not mean that site odds ratios vary by \(0.42\). To express the scale of variation, a rough model-implied central 95% range of site treatment log odds ratios is

$$ -0.55\pm1.96(0.42)=[-1.373,0.273]. $$

Exponentiating gives approximately \([0.253,1.314]\) for the corresponding site-specific conditional odds ratios. This is a distribution-based range around the fitted fixed coefficient, not a confidence interval for \(\beta_T\), and it does not include uncertainty in the estimated fixed effect or variance. The estimated correlation of \(-0.25\) describes the fitted association between site baseline log odds and site treatment deviations; it is not the treatment effect and should not replace reporting \(\tau_1\).

Why the Random-Slope Spread Has This Form

The range just calculated follows directly from the model assumption for \(b_{1j}\). If \(b_{1j}\sim N(0,\tau_1^2)\), then the site treatment log odds ratio \(S_j=\beta_T+b_{1j}\) has mean \(\beta_T\) and variance \(\tau_1^2\). A central 95% range under that normal distribution is approximately its mean plus or minus \(1.96\) standard deviations:

$$ S_j\approx \beta_T\pm1.96\tau_1. $$

Because exponentiation is increasing, exponentiating the two endpoints gives the corresponding range on the odds-ratio scale. This calculation describes model-implied variation between sites; it does not establish that a particular site’s true slope lies in the range. A site-specific predicted slope also has estimation uncertainty, especially when that site has few participants.

The distinction is useful whenever results are communicated: \(\hat{\beta}_T\) and its interval address uncertainty about the central treatment association, while \(\hat{\tau}_1\) addresses estimated heterogeneity of site associations. A small fixed-effect standard error does not imply that site effects are similar. Conversely, appreciable estimated heterogeneity does not by itself establish that the central treatment association differs from zero.

Worked Example: Translating a Site Deviation

Worked Example: Interpreting One Site’s Estimated Deviation

For illustration, suppose the same fitted model reports an estimated random-slope deviation of \(0.30\) for one site. Treat this as a model-based site estimate, not as a known true site effect. The estimated site log odds ratio is

$$ \hat{\beta}_T+\hat{b}_{1j}=-0.55+0.30=-0.25. $$

Its odds ratio is \(\exp(-0.25)=0.779\). Thus the fitted conditional treatment odds for this site are estimated to be about \(0.779\) times its control odds, given the model. The positive deviation moves the site estimate toward the null compared with the central estimate \(0.577\), but the site estimate remains below 1. The deviation \(0.30\) alone is not the site treatment coefficient; it must be added to the fixed coefficient.

Site-specific random-effect estimates are often shrunk toward zero relative to unpooled site estimates. They should be presented with appropriate uncertainty, not ranked as if they were precise observed treatment effects. A list of point estimates can overstate what the data support, particularly when the number of sites or the amount of within-site information is modest.

Worked Example: Explaining Odds and Probabilities

Worked Example: Converting the Central Estimate at a Reference Site

At \(b_{0j}=0\) and \(b_{1j}=0\), the fitted control log odds are \(-1.20\), while the fitted treatment log odds are \(-1.20-0.55=-1.75\). Converting log odds to probabilities using \(p=\exp(\eta)/(1+\exp(\eta))\), the control probability is

$$ \frac{\exp(-1.20)}{1+\exp(-1.20)} =\frac{0.3010}{1.3010}=0.231. $$

The treatment probability at this same reference site is

$$ \frac{\exp(-1.75)}{1+\exp(-1.75)} =\frac{0.1738}{1.1738}=0.148. $$

The difference is approximately \(0.148-0.231=-0.083\), or 8.3 percentage points lower for treatment at this reference site. This is a conditional prediction at zero random effects, not an average probability difference across the study population. The odds ratio is \(0.577\), while the probability difference depends on baseline risk. Reporting the odds ratio as a 42.3% reduction in probability would therefore be incorrect.

Reporting, Diagnostics, and Alternatives

A concise report should make the outcome, treatment contrast, link scale, fixed estimate, uncertainty, and random-slope spread explicit. For the hypothetical output, a suitable statement is: “In the logistic random-intercept and random-treatment-slope model, the estimated central conditional treatment odds ratio was 0.577 (95% Wald CI 0.390 to 0.854). The estimated between-site SD of treatment log odds ratios was 0.42. Under the fitted normal random-slope distribution, the approximate central 95% range of site-specific conditional odds ratios was 0.253 to 1.314; this range does not include estimation uncertainty.” State the outcome’s favorable direction and any adjustment variables in an applied report.

Before presenting such results, check that the model and design support them. Relevant checks include convergence warnings, singular or boundary variance estimates, sensitivity of the slope variance to model specification, unusual influential sites, sparse outcomes or separation, and whether treatment is represented in both arms within enough sites. Compare observed site-level patterns with model-implied predictions where appropriate. A random-slope estimate near zero, a very wide uncertainty interval for the variance, or instability under reasonable model changes should lead to cautious language. A normal random-effects assumption is a modeling approximation, not a guarantee that actual site effects follow a bell-shaped distribution.

Common mistake: “The treatment odds ratio is 0.577, so the treatment effect is the same at every site.” This uses the fixed estimate as if it were every site’s coefficient. In the random-slope model, the site coefficient is \(\beta_T+b_{1j}\); report the fixed estimate and the estimated slope spread separately.

A random-intercept-only model is simpler, but it assumes that the treatment coefficient does not vary across sites. It is not an adequate substitute merely because it produces a treatment estimate that is easier to explain. A model with separate fixed treatment-by-site interactions can estimate site contrasts directly, but uses many parameters and does not partially pool them through a common random-effects distribution. A marginal approach such as generalized estimating equations targets a population-averaged association, which is not generally equal to the conditional fixed effect from this GLMM. These approaches answer related but distinct questions; choose and report the estimand that matches the design and scientific aim.

Finally, the random-slope model does not rescue a weak design. With very few sites, the estimated distribution of slopes can be imprecise; with little treatment information within sites, slope variation may be poorly identified. Nor does a fitted random slope prove that sites differ for a substantive reason. It quantifies heterogeneity under the model and available data, with uncertainty that should be acknowledged.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. If \(\hat{\beta}_T=-0.40\) and \(\hat{\tau}_1=0.30\), what is the central-site conditional treatment odds ratio?
  2. In that same model, calculate the approximate central 95% range of site treatment log odds ratios.
  3. Why is a fixed-effect odds-ratio confidence interval not an interval for the site-to-site spread?
  4. What design feature is particularly helpful for estimating treatment slopes that vary by site?

Solutions. (1) \(\exp(-0.40)=0.670\), so the central-site conditional treatment odds are estimated to be 0.670 times the control odds. (2) \(-0.40\pm1.96(0.30)=[-0.988,0.188]\); this is a model-implied range based on the random-slope distribution, not a confidence interval. (3) The fixed-effect interval quantifies uncertainty about \(\beta_T\), whereas the spread is described by \(\tau_1\), a variance-component parameter. (4) Having both treatment and control participants within enough sites provides within-site treatment contrasts that help separate slope differences from baseline differences.

Clinical Biostats