Tutorials › Nonlinear Mixed-Effects Models (NLME) › Eta Versus Covariate Plots For Remaining Structure

Goodness-of-Fit Diagnostics and Their Pitfalls · Tutorial 557 of 797

Eta Versus Covariate Plots For Remaining Structure

Learn to interpret eta-versus-covariate plots as model diagnostics rather than direct measurements of individual random effects.

Intermediate 11 min read

What You'll Learn

  • Define the population and individual-level quantities shown in an eta-versus-covariate plot.
  • Explain why an estimated trend may indicate a missing or misspecified covariate effect.
  • Recognize how shrinkage and unequal information can change the plotted pattern.
  • Separate exploratory visual evidence from formal evidence that a model needs revision.
  • Compare eta plots with residual-versus-covariate plots and model-based checks.

Why Plot Random-Effect Estimates Against Covariates?

A covariate model describes how a measured characteristic, such as body weight or renal function, relates to a typical model parameter. The random effect describes an individual's deviation from that covariate-adjusted typical value. Plotting estimated random effects against covariates is therefore a way to ask whether those deviations still show a systematic pattern. A visible trend can prompt investigation of an omitted covariate effect, an incorrectly specified covariate relationship, or another model limitation.

The plot is a diagnostic, not a direct picture of the unobserved random effects. Empirical Bayes (EB) estimates are inferred from each individual's data under the fitted model. They are pulled toward the population distribution, and the amount of that pull depends on how informative the individual's observations are. A pattern in the estimates should be interpreted with these features in mind, not as an automatic proof that the model is wrong.

Definition: In a typical NLME model, \(\eta_i\) is the vector of individual \(i\)'s random effects, with population distribution often specified as \(\eta_i\sim N(0,\Omega)\). An EB estimate, written \(\hat{\eta}_i\), is an estimate of that individual's random effects conditional on the fitted model and the individual's observations. An eta-versus-covariate plot places one or more components of \(\hat{\eta}_i\) on the vertical axis and a subject-level covariate on the horizontal axis.

For example, if clearance is modeled on the log scale as \(\log(CL_i)=\log(CL_{\mathrm{typ},i})+\eta_{CL,i}\), then \(\eta_{CL,i}\) is the individual's deviation from the typical log-clearance after accounting for the covariates in \(CL_{\mathrm{typ},i}\). A trend of \(\hat{\eta}_{CL,i}\) with a covariate not included in \(CL_{\mathrm{typ},i}\) may suggest remaining structure. If the covariate is already included, a residual trend may instead suggest that its functional form or implementation needs review. Neither conclusion follows from the plot alone.

What a Pattern Means—and What It Does Not

The central model assumption behind this diagnostic is that, after accounting for the specified covariates, the random effects have mean zero and are not systematically associated with those covariates. In a simple model, this can be expressed as \(E(\eta_i\mid x_i)=0\), where \(x_i\) is a covariate. This does not mean every estimated random effect must be near zero, nor that a finite-sample scatterplot must look perfectly flat. It means that the model does not posit a remaining systematic shift in the random effects with \(x_i\).

A trend may have several explanations. The covariate may have been omitted, a linear effect may need a nonlinear form, or a transformation or reference value may be inappropriate. The pattern may also reflect sparse or unbalanced data, influential individuals, correlations among covariates, or estimation variability. A plot can identify a question worth investigating, but the model and data must be examined before choosing an explanation.

When a covariate has already been included, the relevant question is whether the individual deviations still show structure after that adjustment. A slope in \(\hat{\eta}_i\) against the included covariate can arise from a misspecified covariate effect, but it can also arise from noisy EB estimates or unequal information. A flat trend is not proof that the covariate model is correct: a small sample, weak information, or strong shrinkage can hide a real pattern.

Worked Example: A Group Difference in Estimated Random Effects

Suppose six hypothetical subjects have a binary covariate \(x\), with \(x=0\) denoting the lower group and \(x=1\) the higher group. A fitted model does not include this covariate for the parameter whose random effect is being examined. The estimated random effects, in log-parameter units, are:

GroupEB estimates \(\hat{\eta}_i\)
Lower, \(x=0\)0.02, -0.01, 0.03
Higher, \(x=1\)-0.02, -0.04, 0.00

The lower-group mean is \((0.02-0.01+0.03)/3=0.04/3=0.01333\). The higher-group mean is \((-0.02-0.04+0.00)/3=-0.06/3=-0.02000\). Thus, calculated from the unrounded group sums, the higher-minus-lower difference is \(({-0.06}/3)-({0.04}/3)=-0.10/3=-0.03333\) log-parameter units.

The higher group has a lower mean estimated random effect in this small hypothetical sample. This is a reason to inspect the covariate relationship, not evidence by itself that the covariate causes the parameter difference or that adding it will improve the model. The calculation is descriptive; it does not account for uncertainty in the estimates, differences in information, or other covariates.

Shrinkage and Unequal Information

EB estimates are informed both by an individual's data and by the population distribution of random effects. When an individual's observations provide little information about their random effect, the estimate is pulled more strongly toward the population mean, usually zero. When the observations are more informative, the estimate can be closer to what that individual's data alone would suggest. Thus, subjects with different sampling schedules, numbers of observations, or signal-to-noise ratios can have EB estimates with different degrees of shrinkage.

A simple normal model shows the mechanism. Suppose a subject-specific data summary \(z_i\) is modeled as \(z_i\mid\eta_i\sim N(\eta_i,s_i^2)\), and the random effect has prior distribution \(\eta_i\sim N(0,\omega^2)\). In this illustrative model, the conditional distribution of \(\eta_i\) is normal. Completing the square in the product of prior and likelihood gives its mean:

$$ E(\eta_i\mid z_i) = \frac{\omega^2}{\omega^2+s_i^2}z_i = \lambda_i z_i, \qquad \lambda_i=\frac{\omega^2}{\omega^2+s_i^2}. $$

As \(s_i^2\) increases, the data are less informative and \(\lambda_i\) decreases, pulling the estimate closer to zero. This normal calculation is a simplified illustration, not a formula for every nonlinear mixed-effects model. In the normal model shown, the conditional mean and mode coincide. In nonlinear models, EB estimates are commonly conditional modes, and their behavior can be more complicated.

Worked Example: Equal Data Summaries, Different Shrinkage

Consider the simplified normal model above with \(\omega^2=0.04\). Two hypothetical subjects have the same data summary, \(z_i=0.20\), but different information. Subject A has \(s_A^2=0.16\), and subject B has \(s_B^2=0.01\).

For subject A, \(\lambda_A=0.04/(0.04+0.16)=0.20\), so the estimated random effect is \(0.20(0.20)=0.040\). For subject B, \(\lambda_B=0.04/(0.04+0.01)=0.80\), so the estimated random effect is \(0.80(0.20)=0.160\).

Both subjects have the same \(z_i\), but the more informative subject has an EB estimate four times as large. If information also differs systematically across covariate values, shrinkage can alter the apparent trend in an eta-versus-covariate plot. Therefore, a stronger or weaker trend between groups cannot be interpreted without considering how much data support each subject's estimate.

A plot is most informative when it is read alongside the data and model that produced the estimates. Check whether the covariate groups have similar numbers of observations and similar sampling times, and whether some estimates are based on especially sparse data. Look for concentration near zero, groups with notably different spread, isolated extreme estimates, and patterns that change when influential subjects are reviewed. These features do not replace the diagnostic; they help explain what it can and cannot show.

How to Use the Plot in Model Evaluation

Begin by naming the random-effect component and covariate being examined. State whether that covariate is absent from the typical-parameter model or already included, and whether it is continuous or categorical. Plot one EB estimate per subject, because the covariate and random effect in question are subject-level quantities. If there are many observations per subject, plotting the same EB estimate repeatedly at the observation level would give some subjects excess visual weight.

For a continuous covariate, inspect the scatter, its range and density, and any smooth summary as a descriptive aid. For a categorical covariate, compare the distributions and centers of the estimates across groups, noting group sizes. In either case, include a horizontal reference at zero. A smooth curve or group summary can help reveal structure, but a fitted trend line is not automatically a formal test, and visual smoothness does not establish that the relationship is real.

If the plot suggests a pattern, consider whether it is consistent with the pharmacology, the parameterization, and other diagnostics. A plausible next step may be to fit a scientifically justified covariate effect, revise an existing functional form, or investigate data quality and design differences. Re-estimate the model and evaluate the revised model using its full set of diagnostics. Do not treat a covariate relationship fitted directly to EB estimates as a substitute for fitting and evaluating the NLME model: those estimates are model-dependent and have unequal uncertainty.

1
Specify the diagnostic.
Name the random-effect component, covariate, and current covariate model. Confirm that each plotted point represents one subject.
2
Inspect the pattern and information.
Look for trends, group shifts, changing spread, sparse regions, and influential points; compare how much information supports the estimates across covariate values.
3
Form a model-based explanation.
Decide whether the pattern suggests an omitted effect, a misspecified effect, or a data or estimation issue. Treat this as a hypothesis to investigate, not a conclusion from the plot alone.
4
Check the revised model.
If a change is justified, refit the NLME model and examine whether the pattern and other relevant diagnostics improve without creating new problems.

Comparison, Limitations, and Common Pitfalls

DiagnosticPrimary questionImportant limitation
EB random effects versus covariateDo estimated subject-level deviations show covariate structure?Estimates are shrunken and have unequal uncertainty.
Residuals versus covariateDoes the observation-level prediction error vary with the covariate?Residual patterns address prediction errors, not directly the subject-level random-effect distribution.
Covariate-adjusted model comparison and refittingDoes a scientifically motivated covariate model improve the fitted model?A change in fit must be assessed with appropriate model and diagnostic considerations, not inferred from an eta plot alone.

These approaches answer related but different questions. Residuals can reveal covariate patterns in the observations that are not captured by predictions, while eta plots focus on estimated subject-level deviations. A residual pattern need not produce an obvious eta pattern, and an eta pattern is not a replacement for residual diagnostics. A refitted covariate model asks whether the model describes the data better after the proposed change; it should be considered together with scientific plausibility and other diagnostics.

  • Mistake: treating each EB estimate as the true random effect. The estimate is conditional on the data and model and may be strongly pulled toward zero. Correction: describe the plot as a pattern in estimated random effects and consider subject-specific information.
  • Mistake: assuming a flat plot proves the covariate is irrelevant. Strong shrinkage or limited data can mask structure. Correction: interpret a flat pattern in light of precision, covariate range, and the rest of the model evaluation.
  • Mistake: regressing EB estimates on a covariate and treating the result as a definitive covariate test. The estimates are generated by the fitted model and are not equally precise. Correction: use the plot to motivate a model-based investigation, then fit and evaluate the proposed NLME model.
  • Mistake: looking only for a nonzero mean. Remaining structure may be nonlinear, group-specific, or expressed as changing spread rather than a simple linear trend. Correction: inspect the shape, distribution of points, and information across the covariate range.

The plot has further limits: EB estimates may be unstable for individuals with little information, correlations among covariates can make the source of a trend unclear, and a narrow covariate range can hide important relationships. It is a screening and interpretation tool, not a standalone test of model adequacy or a guarantee that a proposed covariate effect is scientifically meaningful.

Key takeaway: An eta-versus-covariate plot asks whether estimated individual deviations retain systematic covariate structure after the current model adjustment. Interpret any trend in context, accounting for shrinkage, unequal information, and model specification; use it to guide, not replace, model-based evaluation.

Worked Example: Interpreting a Trend After Covariate Adjustment

Consider a hypothetical log-clearance model and a binary covariate \(x\), where \(x=0\) denotes one group and \(x=1\) another. In a simplified display, the EB estimates from a model that omits \(x\) are \(-0.01\) and \(0.01\) for the two subjects in group 0, and \(-0.02\) and \(0.02\) for the two subjects in group 1. The group means are \((-0.01+0.01)/2=0.00\) and \((-0.02+0.02)/2=0.00\), so this particular set of values does not show a group-mean shift. Now suppose a different omitted-covariate fit gives \(\hat{\eta}\) values \(0.00, 0.02\) in group 0 and \(0.28, 0.32\) in group 1. These are deliberately hypothetical diagnostic values, not data from a real study.

For the latter fit, the group means are \(0.01\) and \(0.30\), respectively, and the difference is \(0.30-0.01=0.29\) log-clearance units. This sizeable descriptive shift motivates checking whether \(x\) should be included. Suppose a scientifically justified refit includes \(\beta_x x\) in typical log clearance, and a subsequent simplified display of EB estimates is \(-0.01, 0.01\) for group 0 and \(-0.02, 0.02\) for group 1. The means are now both zero. This illustrates how an adjusted model can remove a group pattern; it does not establish that the refit must do so in real data, or that these small samples establish a true effect.

The interpretation depends on the refitted model and the information behind each estimate. If one group had much sparser observations, its estimates might be more strongly shrunk, and the apparent reduction or persistence of the pattern would need cautious interpretation. The plotted estimates should be reviewed with the model fit and other diagnostics before drawing a conclusion.

Check Your Understanding

Answer each question using the distinction between estimated random effects and unobserved random effects.

  1. A plot of \(\hat{\eta}_{CL,i}\) against body weight has a downward trend. The current typical-clearance model does not include body weight. What is a reasonable interpretation, and what is not justified?
  2. In the simplified normal model, let \(\omega^2=0.09\), \(z_i=0.30\), and \(s_i^2=0.21\). Calculate the EB estimate.
  3. Why could subjects with the same data summary have different EB estimates?
  4. A covariate is already included, and the eta plot against it looks flat. Does this prove the covariate model is correct? Explain.
  5. Why should one EB estimate per subject be plotted rather than repeating that estimate once for every observation?

Solutions. (1) The trend is a diagnostic signal consistent with remaining association that merits investigation of a body-weight effect. It does not prove the effect is causal, establish the correct functional form, or prove that adding body weight will improve the model. (2) \(\lambda_i=0.09/(0.09+0.21)=0.30\), so \(\hat{\eta}_i=\lambda_i z_i=0.30(0.30)=0.090\). (3) Their information variances \(s_i^2\) can differ, changing the shrinkage factor \(\omega^2/(\omega^2+s_i^2)\). (4) No. A flat plot may coexist with misspecification, limited covariate range, or strong shrinkage; it is one diagnostic, not proof. (5) The estimate and covariate are subject-level quantities. Repeating estimates for subjects with more observations would visually overweight those subjects and could misrepresent the subject-level pattern.