Tutorials › Generalized Linear Models › Marginal Mean Specifications for Continuous Outcomes

Marginal Mean Models · Tutorial 829 of 981

Marginal Mean Specifications for Continuous Outcomes

Build identity-link and log-link marginal mean models for continuous clustered responses, then translate their coefficients into fitted means and interpretable response-scale comparisons.

Advanced 11 min read

What You'll Learn

  • Define a marginal mean for a continuous response observed within a cluster.
  • Specify identity-link models and interpret their coefficients in outcome units.
  • Specify log-link models and translate coefficients into mean ratios and response-scale differences.
  • Interpret treatment-by-time interactions under identity and log links.
  • Distinguish modeling the mean from transforming the observed outcome or specifying its full distribution.
  • Check the fitted-mean domain and choose covariate contrasts that answer the scientific question.

Marginal Means for Continuous Clustered Responses

A continuous outcome measured repeatedly on the same person, or on several members of the same group, can have a mean that changes with treatment, time, and other covariates. A marginal mean model describes that change directly: it specifies the average response for each covariate pattern without making the mean conditional on the other responses in the cluster.

Two useful choices are the identity link, which models the mean itself as a linear predictor, and a nonlinear link, such as the log link, which models a transformation of the mean. The choice changes both the form of the fitted means and the interpretation of covariate effects.

Definition: For cluster \(i\) and response occasion or member \(j\), let \(Y_{ij}\) be a continuous response and let \(X_i\) denote the covariates recorded for that cluster. The marginal mean is \(\mu_{ij}=E[Y_{ij}\mid X_i]\). A marginal mean model specifies \(g(\mu_{ij})=x_{ij}^{\mathsf T}\beta\), where \(g\) is a link function, \(x_{ij}\) is a chosen covariate vector, and \(\beta\) is a vector of regression parameters. The mean is marginal with respect to the other responses in the cluster; it is still indexed by the covariates.

The predictor \(x_{ij}^{\mathsf T}\beta\) may include an intercept, indicators, time terms, interactions, or other chosen functions of covariates. The model concerns the mean, not the entire distribution of \(Y_{ij}\). In particular, specifying a mean does not by itself specify a variance or a within-cluster dependence pattern.

Identity-Link Models

With the identity link \(g(\mu)=\mu\), the marginal mean is linear in the predictor:

$$ \mu_{ij}=x_{ij}^{\mathsf T}\beta. $$

This link is natural when additive differences in the original outcome units are scientifically meaningful. A coefficient for a binary treatment, when there are no interactions involving treatment, is the adjusted difference in marginal means between treatment groups. A coefficient for a continuous covariate is the change in the mean per unit increase in that covariate, holding the other modeled covariates fixed.

Because a linear predictor can take any real value, an identity-link specification does not automatically keep fitted means positive. Whether that is acceptable depends on the outcome and on the covariate patterns over which predictions are needed. A model whose fitted mean is negative for a pattern where negative values are impossible is not a satisfactory mean specification for that use.

Worked Example: Identity Link With Treatment and Time

Suppose a repeated continuous outcome is measured in points, and \(A_i=1\) denotes treatment while \(A_i=0\) denotes control. Let \(t_{ij}\) be time in years since baseline. Consider the marginal mean model

$$ \mu_{ij}=120-4A_i+2t_{ij}-1.5A_it_{ij}. $$

At baseline, \(t=0\), the control mean is \(120\) points. The treatment mean is \(120-4=116\) points, so the treatment-minus-control difference is \(-4\) points at baseline.

At \(t=3\), the control mean is \(120+2(3)=126\) points. The treatment mean is \(120-4+2(3)-1.5(1)(3)=117.5\) points. The treatment-minus-control difference is \(117.5-126=-8.5\) points.

The coefficient \(-1.5\) is the difference between the treatment and control time slopes, measured in points per year. The control mean increases by 2 points per year; the treatment mean changes by \(2-1.5=0.5\) points per year. Thus the treatment difference becomes 1.5 points more negative for each additional year in this model.

Log-Link Models for Positive Means

For a response whose mean must be positive, a common nonlinear choice is the log link \(g(\mu)=\log(\mu)\). Its inverse link is the exponential function:

$$ \log(\mu_{ij})=x_{ij}^{\mathsf T}\beta \qquad\Longleftrightarrow\qquad \mu_{ij}=\exp(x_{ij}^{\mathsf T}\beta). $$

Every finite linear predictor then gives a positive fitted mean. The model is linear in the log of the mean, not in the outcome itself. Consequently, coefficients generally do not represent additive changes in the original outcome units. For a binary covariate with coefficient \(\beta_A\) and no interactions involving it, changing that covariate from 0 to 1 multiplies the mean by \(\exp(\beta_A)\). This is a ratio of means; the corresponding difference depends on the starting mean.

Worked Example: A Treatment Mean Ratio Under a Log Link

Suppose a positive continuous clinical measure has the marginal mean model

$$ \log(\mu_{ij})=\log(12)+0.10t_{ij}+\log(1.25)A_i, $$

where \(t\) is time in years and \(A=1\) denotes treatment. At \(t=1\), the control mean is

$$ \mu_{\mathrm{control}}=12\exp(0.10)=13.262042\ldots\approx13.262. $$

For treatment, the fitted mean is

$$ \mu_{\mathrm{treatment}}=12\exp(0.10)\exp(\log(1.25)) =12\exp(0.10)(1.25) =16.577553\ldots\approx16.578. $$

The treatment-to-control mean ratio is \(1.25\), so the fitted treatment mean is 25% higher at this time. The response-scale difference, calculated using the unrounded fitted means, is \(12\exp(0.10)(1.25-1)=3.315511\ldots\approx3.316\) outcome units. The ratio is constant over time in this model, while the absolute difference changes with the control mean.

How Link-Scale Effects Become Response-Scale Effects

A coefficient is first interpreted on the scale specified by the link. To answer a scientific question about the original outcome, use the inverse link to obtain fitted means and then take the requested difference, ratio, or other contrast. Under a log link, this translation can be written exactly.

Theorem: Suppose \(\mu(x)=\exp(\eta(x))\), with \(\eta(x)=x^{\mathsf T}\beta\). For two covariate patterns \(x_0\) and \(x_1\), the ratio of their marginal means is \(\exp\{(x_1-x_0)^{\mathsf T}\beta\}\), and the difference is \(\exp(x_1^{\mathsf T}\beta)-\exp(x_0^{\mathsf T}\beta)\).

Proof. By the inverse log link, \(\mu(x_1)=\exp(x_1^{\mathsf T}\beta)\) and \(\mu(x_0)=\exp(x_0^{\mathsf T}\beta)\). Dividing the first equality by the second and using \(\exp(a)/\exp(b)=\exp(a-b)\) gives

$$ \frac{\mu(x_1)}{\mu(x_0)} =\exp\{x_1^{\mathsf T}\beta-x_0^{\mathsf T}\beta\} =\exp\{(x_1-x_0)^{\mathsf T}\beta\}. $$

Subtracting the two fitted means gives the stated difference directly. The difference is not generally a constant determined by the coefficient contrast alone, since it also depends on the covariate pattern through the baseline mean. \(\square\)

For a continuously varying covariate \(z\), if the predictor is differentiable in \(z\), the response-scale slope follows from the chain rule. In a log-link model, \(\mu(z)=\exp(\eta(z))\), so

$$ \frac{d\mu(z)}{dz} =\exp(\eta(z))\frac{d\eta(z)}{dz} =\mu(z)\frac{d\eta(z)}{dz}. $$

Thus, if \(z\) enters the predictor linearly with coefficient \(\beta_z\), the instantaneous response-scale change is \(\beta_z\mu(z)\), not simply \(\beta_z\) outcome units. For a finite change \(\Delta\), the mean ratio is \(\exp(\beta_z\Delta)\), provided no other model terms change.

Worked Example: A Treatment-by-Time Interaction With a Log Link

Consider a positive continuous response with

$$ \log(\mu_{ij})=\log(8)+0.04t_{ij}+0.12A_i-0.02A_it_{ij}. $$

At \(t=2\), the control mean is \(8\exp(0.04(2))=8\exp(0.08)=8.666297\ldots\), or about \(8.666\) units. The treatment mean is \(8\exp(0.08+0.12-0.02(2))=8\exp(0.16)=9.388087\ldots\), or about \(9.388\) units.

The treatment-to-control ratio at \(t=2\) is \(\exp\{0.12-0.02(2)\}=\exp(0.08)=1.083287\ldots\). Thus, at that time the fitted treatment mean is about 8.33% higher. The fitted difference is \(8\{\exp(0.16)-\exp(0.08)\}=0.721790\ldots\), or about \(0.722\) units.

At baseline, the ratio is \(\exp(0.12)=1.127497\ldots\), about 12.75% higher. The interaction coefficient \(-0.02\) means the log mean ratio changes by \(-0.02\) per year; it does not mean that the response-scale difference decreases by exactly 0.02 units per year.

Interactions and Mean Contrasts Under the Identity Link

Under an identity link, a treatment-by-time interaction has a direct additive interpretation. In the model \(\mu=\beta_0+\beta_A A+\beta_t t+\beta_{At}At\), the treatment-minus-control mean difference at time \(t\) is \(\beta_A+\beta_{At}t\). The interaction coefficient is the change in that difference per unit of time.

Result: In the identity-link model \(\mu(A,t)=\beta_0+\beta_AA+\beta_tt+\beta_{At}At\), the difference between the treatment and control time slopes equals \(\beta_{At}\), and the treatment-minus-control mean difference at time \(t\) equals \(\beta_A+\beta_{At}t\).

Derivation. Setting \(A=0\) gives \(\mu(0,t)=\beta_0+\beta_tt\), whose slope with respect to \(t\) is \(\beta_t\). Setting \(A=1\) gives \(\mu(1,t)=\beta_0+\beta_A+(\beta_t+\beta_{At})t\), whose slope is \(\beta_t+\beta_{At}\). Subtracting the control slope from the treatment slope gives \(\beta_{At}\). Subtracting the two means at the same \(t\) gives

$$ \mu(1,t)-\mu(0,t) =\{\beta_0+\beta_A+(\beta_t+\beta_{At})t\} -\{\beta_0+\beta_tt\} =\beta_A+\beta_{At}t. $$

These are additive effects in the outcome's original units. With a log link and the same predictor terms, the corresponding treatment-to-control ratio is \(\exp(\beta_A+\beta_{At}t)\): the interaction changes the log ratio per unit time. \(\square\)

Choosing and Reporting a Mean Specification

The link should reflect the scale on which a linear predictor is useful and the range of means that is plausible. An identity link makes additive changes straightforward but may predict means outside a scientifically possible range. A log link guarantees positive means and makes multiplicative comparisons straightforward, but its coefficients are not additive outcome-unit effects. Neither link is automatically right for every continuous outcome.

A report should state the modeled mean, identify the link, and give the covariate pattern for each interpretation. For example, “the treatment-to-control ratio at year two is \(\exp(\beta_A+2\beta_{At})\)” is more informative than saying only that “the treatment coefficient is an effect.” If the scientific question concerns an absolute difference, calculate that difference from the fitted means at the stated covariate values. If it concerns a relative change, report the corresponding ratio or percentage.

Common pitfall: Treating a log-link coefficient as a fixed increase in outcome units. If the treatment coefficient is \(\log(1.25)\), it implies a mean ratio of 1.25 when treatment is the only changed term. It does not imply an increase of 0.25 units. The absolute increase is \((1.25-1)\) times the reference mean, so it varies with that mean.

A related error is to treat a log-link mean model as a model for \(\log(Y_{ij})\). The specification here is \(\log\{E[Y_{ij}\mid X_i]\}=x_{ij}^{\mathsf T}\beta\); it does not assert that the observed outcome has been logged or that its conditional distribution is lognormal. Keeping the mean specification distinct from assumptions about the full response distribution makes the interpretation precise.

Check Your Understanding

Use the stated link and covariate pattern when interpreting each model.

  1. In an identity-link model, what does a treatment coefficient represent when there are no interactions involving treatment?
  2. For a log-link model with a treatment coefficient of \(\log(1.4)\) and no treatment interactions, give the treatment-to-control mean ratio and percentage increase.
  3. Why can the absolute treatment difference vary across time even when a log-link model has a constant treatment coefficient?
  4. In an identity-link model with a treatment-by-time term, what does the interaction coefficient describe?
  5. Does specifying \(\log\{E[Y_{ij}\mid X_i]\}\) as a linear predictor imply that the outcome itself has been logged? Explain.
Clinical Biostats