Why Interpret Predicted Outcomes?
An interaction coefficient describes how a model changes with its coding and scale. It does not, by itself, show the predicted outcome for each genotype–exposure combination or the size of a clinically meaningful comparison. Reporting those predictions makes the model’s implications easier to inspect: readers can see the outcome levels, compare exposure groups within genotype, and assess how those comparisons vary across genotypes.
This tutorial uses model-based predictions to do that work. The predictions are conditional on the fitted model and on specified values of any other covariates. They are not automatically causal effects. A causal interpretation requires additional design and identification assumptions; an association model alone does not establish them.
From a Fitted Model to Cell Predictions
Suppose genotype is represented by categories \(G=0,1,2\), and exposure is binary, \(E=0,1\). With genotype 0 and exposure 0 as reference categories, a linear model for a quantitative outcome can be written as
Here \(I(\cdot)\) equals 1 when its condition is true and 0 otherwise. Substituting each genotype–exposure combination gives six fitted means. The reference mean is \(\beta_0\); for example, the mean for genotype 2 and exposure 1 is \(\beta_0+\beta_{G2}+\beta_E+\beta_{G2E}\). The exposure contrast in genotype 2 is \(\beta_E+\beta_{G2E}\), while the difference between that contrast and the exposure contrast in genotype 0 is \(\beta_{G2E}\).
For any model, the same principle applies: specify the model, substitute the desired covariate values, and compute the outcome-scale predictions. A contrast is then a stated combination of those predictions. This distinction matters because a coefficient is not always itself the clinical comparison of interest.
Worked Example: Predicted Means and Exposure Contrasts
Suppose a hypothetical study models a quantitative clinical score in points using the linear model above. The fitted coefficients are \(\hat\beta_0=50\), \(\hat\beta_{G1}=4\), \(\hat\beta_{G2}=9\), \(\hat\beta_E=6\), \(\hat\beta_{G1E}=3\), and \(\hat\beta_{G2E}=-2\). Assume the fitted coefficient covariance matrix is diagonal, with standard errors 2, 1.5, 1.8, 1.2, 1.0, and 1.1, respectively. This simplified covariance structure is stipulated for the example; in an actual analysis, use the estimated covariance matrix from the model.
For genotype 0 and exposure 0, the prediction is \(\hat\mu_{00}=50\) points. For genotype 0 and exposure 1, it is \(\hat\mu_{01}=50+6=56\) points. The exposure contrast is \(56-50=6\) points.
For genotype 1, the predictions are \(\hat\mu_{10}=50+4=54\) and \(\hat\mu_{11}=50+4+6+3=63\) points. Its exposure contrast is \(63-54=9\) points. For genotype 2, the predictions are \(\hat\mu_{20}=50+9=59\) and \(\hat\mu_{21}=50+9+6-2=63\) points. Its exposure contrast is \(63-59=4\) points.
The exposure contrasts are therefore 6, 9, and 4 points for genotypes 0, 1, and 2. Relative to genotype 0, the contrast for genotype 1 differs by \(9-6=3\) points, and the contrast for genotype 2 differs by \(4-6=-2\) points. These are the fitted interaction contrasts on the score scale; the predictions show the underlying levels that those contrasts summarize.
Under the stated diagonal covariance, the standard error of the genotype-2 exposure contrast is \(SE(\hat\beta_E+\hat\beta_{G2E})=\sqrt{1.2^2+1.1^2}=\sqrt{2.65}=1.628\) points. A normal-approximation 95% confidence interval is \(4\pm1.96(1.628)\), or \(0.81\) to \(7.19\) points. Under the model and its uncertainty assumptions, the estimated exposure-group difference for genotype 2 is 4 points, with this interval expressing sampling uncertainty. It is not a 95% probability statement about the fixed contrast.
Uncertainty for Predictions and Contrasts
Point predictions alone can make a comparison look more precise than the data support. Let \(\hat{\boldsymbol\beta}\) be the vector of fitted coefficients and let \(\widehat{\mathrm{Cov}}(\hat{\boldsymbol\beta})\) be its estimated covariance matrix. A linear prediction can be written as \(\hat\mu=\mathbf{x}^{T}\hat{\boldsymbol\beta}\), where \(\mathbf{x}\) contains the design values for the genotype, exposure, and any other covariates. Its estimated variance is
For a contrast of predictions, write \(\hat\theta=\mathbf{c}^{T}\hat{\boldsymbol\beta}\), where \(\mathbf{c}\) combines the relevant design vectors with the desired signs and weights. Then
This calculation includes covariance between coefficient estimates. Adding coefficient variances while ignoring covariance is generally incorrect unless the relevant covariances are zero. For a sufficiently large sample and an approximately normal estimator, a 95% confidence interval is often calculated as \(\hat\theta\pm1.96SE(\hat\theta)\). If inference uses a \(t\) reference distribution, use its appropriate degrees of freedom instead. The model, sampling assumptions, and variance estimator must support the chosen interval.
For a linear model, a confidence interval for the mean prediction describes uncertainty about the fitted mean at the specified covariate values. It is not a prediction interval for one future individual’s outcome; the latter also includes individual residual variation. State which interval is being reported.
Plotting Predicted Outcomes
A clear plot places exposure on the horizontal axis and the predicted outcome on the vertical axis, using separate points or lines for genotype categories. Include units, identify the exposure coding, and show confidence intervals or bands for the predictions when useful. If exposure is continuous, plot predictions over a clinically meaningful range rather than only at arbitrary values. Plotting the fitted values does not change the model; it displays the model’s implications.
A plot should make the comparison being discussed visible. For binary exposure, connecting the two predictions within each genotype can help compare exposure differences. For continuous exposure, genotype-specific prediction curves show how fitted outcome patterns vary with exposure. Predictions for covariates held fixed describe that particular profile; predictions averaged across a covariate distribution describe a different target. Label which is shown.
Worked Example: Plotting Predictions Across Continuous Exposure
Consider a hypothetical linear model for a clinical measurement in units, with genotype \(G=0\) or \(G=1\) and exposure \(E\) measured in units: \(\hat\mu=40+5G+1.2E+0.6GE-0.02E^2\). Predictions are evaluated at \(E=0,5,10\), all within the exposure range of interest.
At \(E=0\), the predictions are 40 units for \(G=0\), and \(40+5=45\) units for \(G=1\). At \(E=5\), the \(G=0\) prediction is \(40+1.2(5)-0.02(25)=45.5\) units. The \(G=1\) prediction is \(40+5+1.2(5)+0.6(5)-0.02(25)=53.5\) units. At \(E=10\), the predictions are \(40+1.2(10)-0.02(100)=50\) units for \(G=0\), and \(40+5+1.2(10)+0.6(10)-0.02(100)=61\) units for \(G=1\).
The plotted coordinates are therefore \((0,40),(5,45.5),(10,50)\) for \(G=0\), and \((0,45),(5,53.5),(10,61)\) for \(G=1\), with exposure in units and outcome in units. The genotype difference grows from 5 units at \(E=0\) to 11 units at \(E=10\). In this model, the change in that difference is \(0.6(10-0)=6\) units; the quadratic exposure term cancels because it is shared by both genotypes.
Suppose the estimated standard error of \(\hat\beta_{GE}=0.6\) is 0.2 and the model-based normal approximation is appropriate. The 6-unit difference-in-differences has standard error \(10(0.2)=2\) units, so its 95% confidence interval is \(6\pm1.96(2)\), or 2.08 to 9.92 units. This interval concerns the change in the genotype difference between exposure 0 and 10 under the fitted model, not the uncertainty of every plotted point. In practice, compute and display uncertainty for each prediction or contrast that is central to the report.
Binary Outcomes: Predict Risks Before Comparing Them
For a binary outcome, logistic regression models the log odds rather than the risk directly. With a fitted linear predictor \(\hat\eta\), the predicted risk is \(\hat p=1/(1+\exp(-\hat\eta))\). A coefficient or product term on the log-odds scale does not directly give a risk difference. To report absolute clinical comparisons, calculate the predicted risks for each genotype–exposure combination first, then subtract them on the risk scale.
Uncertainty must also be transformed. For a single predicted risk, the delta method uses the derivative \(d p/d\eta=p(1-p)\), so \(SE(\hat p)\) is approximately \(\hat p(1-\hat p)SE(\hat\eta)\). For a risk difference, use the variance of the difference, accounting for covariance between the predictions. When the cell predictions are independent, their variances add; otherwise, include the covariance term. Confidence intervals from this approximation can extend below 0 or above 1, in which case a suitable interval method on a transformed scale may be preferable.
Worked Example: Logistic Predictions and Risk Differences
In a hypothetical study, a saturated logistic model gives fitted log odds \(\hat\eta\) of \(-3.0\), \(-2.5\), \(-2.2\), and \(-1.3\) for cells \((G,E)=(0,0),(1,0),(0,1),(1,1)\), respectively. Suppose their standard errors are 0.35, 0.40, 0.38, and 0.50, and the four fitted cell log odds are independent, as can arise for disjoint groups in this simplified setup.
Transform each fitted log odds to a risk. For \((0,0)\), \(\hat p=1/(1+\exp(3.0))=0.0474\). For \((1,0)\), \(\hat p=1/(1+\exp(2.5))=0.0759\). For \((0,1)\), \(\hat p=1/(1+\exp(2.2))=0.0998\). For \((1,1)\), \(\hat p=1/(1+\exp(1.3))=0.2142\). Thus the predicted risks are approximately 4.74%, 7.59%, 9.98%, and 21.42%.
The exposure risk difference is \(0.0998-0.0474=0.0524\), or 5.24 percentage points, for genotype 0. For genotype 1 it is \(0.2142-0.0759=0.1383\), or 13.83 percentage points. The difference between these exposure contrasts is \(0.1383-0.0524=0.0859\), or 8.59 percentage points. These are model-based comparisons, not automatically causal effects.
For genotype 0, the delta-method risk standard errors are approximately \(0.0474(1-0.0474)(0.35)=0.0158\) and \(0.0998(1-0.0998)(0.38)=0.0341\). Under the assumed independence, the exposure risk-difference standard error is \(\sqrt{0.0158^2+0.0341^2}=0.0376\). Its approximate 95% interval is \(0.0524\pm1.96(0.0376)\), or \(-0.0213\) to \(0.1261\), equivalent to about \(-2.13\) to \(12.61\) percentage points. The interval is wide and includes zero; the point estimate alone would conceal that uncertainty.
How to Report the Results
A useful report identifies the outcome scale, the covariate profile or population used for predictions, the predicted outcomes, and the contrasts with uncertainty. For example: “At the stated covariate profile, predicted mean scores were 59 and 63 points for genotype 2 under exposure 0 and 1, respectively; the exposure-group difference was 4 points (95% confidence interval 0.81 to 7.19).” This reports levels, comparison, units, and uncertainty together.
Do not treat a product-term p-value as a substitute for this description. The p-value tests a specific null hypothesis about a model parameter on a particular scale. It does not tell readers the absolute risks, mean outcomes, or clinical size of contrasts. Conversely, a clinically substantial estimated contrast may be imprecise. Report estimates and intervals, and state which scale defines each comparison.
Common Mistakes
- Reading a coefficient as every cell’s outcome. The reference-cell intercept is only the fitted outcome for the reference genotype and exposure, at the model’s specified covariate values. Substitute values to obtain other predictions.
- Comparing separate confidence intervals instead of estimating a contrast. Overlap or non-overlap of two prediction intervals is not a test or confidence interval for their difference. Calculate the contrast and its standard error directly.
- Reporting log-odds as risks. Logistic coefficients are on the log-odds scale. Transform the fitted linear predictor to obtain risks before calculating risk differences.
- Calling a model-based association causal. Predictions describe what the fitted model implies under its assumptions. They do not alone establish what would happen under an intervention.
- Leaving the prediction target unclear. Predictions at fixed covariates and predictions averaged over a population answer different questions. State which target is reported.
Check Your Understanding
Answer each question by identifying the comparison and scale before interpreting its numerical result.
- In a linear model with a categorical genotype and binary exposure, what is the fitted exposure contrast for genotype 2 in terms of the model coefficients?
- Why must the covariance between coefficient estimates be included when calculating uncertainty for a contrast?
- A logistic model has predicted risks of 0.08 and 0.14 for two exposure groups within one genotype. What is the exposure risk difference, in percentage points?
- What is the distinction between a confidence interval for a fitted mean and a prediction interval for one future individual?
- What additional information should accompany a plot of model-based predictions when the model includes covariates?