Tutorials › Pharmacometric Workflows and Reproducible Modeling › Reporting Shrinkage Alongside Residual Diagnostics

Automating Diagnostics and Reports · Tutorial 297 of 399

Reporting Shrinkage Alongside Residual Diagnostics

You will learn to report shrinkage transparently and use it to qualify how much individual-level diagnostic displays can support interpretation.

Intermediate 11 min read

What You'll Learn

  • Calculate standard-deviation-based shrinkage for each random effect using its empirical Bayes estimates and estimated population variability.
  • Distinguish standard-deviation-based shrinkage from variance-based shrinkage.
  • Explain why high shrinkage makes individual random-effect estimates less informative about between-subject differences.
  • Separate eta shrinkage from shrinkage in conditional residuals.
  • Report shrinkage alongside individual-level diagnostic panels without treating it as a pass/fail criterion.
  • Identify negative, unstable, or incomparable shrinkage summaries and explain their limitations.

Why Report Shrinkage With Individual Diagnostics?

An individual fit panel or random-effect plot can look highly informative: each subject has a fitted curve, residual profile, or estimated deviation from the population. But these displays depend on how much the data identify each subject’s parameters. When the data are sparse or weakly informative, individual estimates are pulled toward the population values. A plot of those estimates may then understate real between-subject variation, and apparent regularity in individual fits should not be mistaken for strong subject-specific evidence.

Shrinkage is a descriptive summary of this pull toward the population. Reporting it with individual-level diagnostics gives readers a reason to temper interpretation where appropriate. It does not replace inspection of residual patterns, establish that a model is adequate, or provide a threshold that automatically determines whether a plot is usable.

Definition: For random-effect component \(k\), let \(\hat{\eta}_{ik}\) be the empirical Bayes estimate for subject \(i\), and let \(\hat{\omega}_k\) be the estimated population standard deviation for that component. The standard-deviation-based eta shrinkage is $$ \text{Shrinkage}_{\eta,k} = 1-\frac{s(\hat{\eta}_{1k},\ldots,\hat{\eta}_{nk})}{\hat{\omega}_k}, $$ where \(s\) is the sample standard deviation across the \(n\) included subjects. Multiply by 100 to report a percentage. State this definition when reporting the value, because a variance-based definition is also used.

In a common log-normal parameter model, an individual parameter is \(P_{ik}=P_{\mathrm{typ},k}\exp(\eta_{ik})\), where \(P_{\mathrm{typ},k}\) is the typical population parameter and \(\eta_{ik}\) is a subject-specific random effect. The random effect is dimensionless; the parameter retains its own units. Shrinkage is calculated on the random-effect scale, not by applying the formula directly to the individual parameter values.

What the Summary Measures

The model assumes, for example, that \(\eta_{ik}\) has population mean zero and standard deviation \(\omega_k\). If the empirical Bayes estimates vary much less across subjects than that estimated population distribution, their sample standard deviation is small relative to \(\hat{\omega}_k\), giving high shrinkage. This describes the dispersion of the estimates relative to the fitted population dispersion. It does not reveal the true random effects, which are unobserved.

The standard-deviation-based value is not the only convention. A variance-based summary is

$$ \text{Shrinkage}^{(\mathrm{var})}_{\eta,k} = 1-\frac{s^2(\hat{\eta}_{1k},\ldots,\hat{\eta}_{nk})}{\hat{\omega}_k^2}. $$

These definitions are not numerically interchangeable. The first compares standard deviations; the second compares variances. A report should name the definition rather than present an unqualified percentage. Neither measure is a probability that an individual estimate is wrong, nor does a value such as 30% mean that every subject’s estimate has been reduced by 30%.

Worked Example: Calculating Eta Shrinkage

Suppose a hypothetical analysis estimates \(\hat{\omega}_k=0.50\) for a random effect. The five empirical Bayes estimates are \(-0.40,-0.20,0,0.20,0.40\). Calculate standard-deviation-based shrinkage.

The estimates have mean zero. Their sum of squared deviations from the mean is \(0.16+0.04+0+0.04+0.16=0.40\). Thus their sample variance and sample standard deviation are

$$ s^2=\frac{0.40}{5-1}=0.10, \qquad s=\sqrt{0.10}=0.3162. $$

Substituting into the stated definition gives

$$ \text{Shrinkage}_{\eta,k} = 1-\frac{0.3162}{0.50} = 0.3676 \approx 36.8\%. $$

Under the variance-based definition, the result would instead be \(1-0.10/0.25=0.60\), or 60.0%. The difference is not an arithmetic error; it reflects the use of a different definition. A reproducible report names which one was used.

Why High Shrinkage Changes Interpretation

A simple normal-normal model shows why estimates contract when subject-specific information is weak. Suppose an observation \(Y_i\) measures a random effect with error:

$$ \eta_i\sim N(0,\omega^2), \qquad Y_i\mid\eta_i\sim N(\eta_i,\sigma^2). $$

Under these assumptions, the conditional mean of \(\eta_i\) given \(Y_i\) is the empirical Bayes estimate:

$$ E(\eta_i\mid Y_i) = \frac{\omega^2}{\omega^2+\sigma^2}Y_i. $$

The multiplier is between zero and one. When measurement error \(\sigma^2\) is large relative to population variance \(\omega^2\), the multiplier is small, so estimates lie closer to zero. Across repeated subjects, \(Y_i\) has variance \(\omega^2+\sigma^2\). Therefore the variance of these conditional means is

$$ \left(\frac{\omega^2}{\omega^2+\sigma^2}\right)^2 (\omega^2+\sigma^2) = \frac{\omega^4}{\omega^2+\sigma^2}. $$

Relative to the population variance \(\omega^2\), this is a fraction \(\omega^2/(\omega^2+\sigma^2)\). As the subject-level information weakens, the estimates have less dispersion than the underlying random effects. This derivation illustrates the contraction; in fitted nonlinear mixed-effects models, the actual calculation and degree of shrinkage depend on the model, data, and estimation procedure.

Consequently, a tight cloud of empirical Bayes estimates around zero does not necessarily show that subjects truly have little heterogeneity. With high shrinkage, it may mainly show that the available data do not distinguish individual deviations well. Individual parameter estimates and the residual profiles based on them should be interpreted with that limitation in view.

Worked Example: Qualifying an Individual Fit Panel

In a hypothetical model, typical clearance is \(10\ \mathrm{L/h}\), and the clearance random effect has estimated standard deviation \(\hat{\omega}_{\mathrm{CL}}=0.50\). Across six subjects, the empirical Bayes estimates are \(-0.10,-0.05,0,0.05,0.10,0\). Calculate shrinkage and describe what a set of individual clearance fits can support.

The estimates have mean zero and sum of squared deviations \(0.01+0.0025+0+0.0025+0.01+0=0.025\). Their sample standard deviation is

$$ s=\sqrt{\frac{0.025}{6-1}} =\sqrt{0.005} =0.07071. $$

The standard-deviation-based shrinkage is

$$ 1-\frac{0.07071}{0.50} = 0.8586 \approx 85.9\%. $$

For the log-normal parameterization, the estimated individual clearances are \(10\exp(\hat{\eta}_{i,\mathrm{CL}})\ \mathrm{L/h}\). For example, the estimate for \(\hat{\eta}=-0.10\) is \(10\exp(-0.10)=9.048\ \mathrm{L/h}\), while for \(\hat{\eta}=0.10\) it is \(11.05\ \mathrm{L/h}\). These fitted values are close to the typical clearance, but the high shrinkage cautions against reading their narrow spread as strong evidence that individual clearances are similar. A panel can still show observed-versus-fitted discrepancies or time-ordered residual patterns; it provides weaker support for claims about between-subject differences in clearance.

Eta Shrinkage Is Not Residual Shrinkage

Eta shrinkage concerns the dispersion of empirical Bayes random-effect estimates. Conditional residuals answer a different question and may also be compressed because individual predictions use subject-specific estimates informed by the same observations. A small spread of conditional residuals can therefore make a residual display appear reassuring even when those residuals have limited ability to reveal model problems.

Some workflows report an epsilon-shrinkage summary based on standardized conditional residuals. For example, if the chosen residual \(r_i\) has a reference standard deviation of one, a workflow may define a descriptive summary as \(1-s(r_1,\ldots,r_m)\), where \(m\) is the number of residuals. This is a convention that must be stated, including which residual was used and which records were included. It is not the eta-shrinkage formula, and residual definitions or standardization choices should not be silently mixed.

Worked Example: Distinguishing Two Shrinkage Summaries

Suppose a hypothetical report uses standard-deviation-based eta shrinkage and, separately, defines residual shrinkage as one minus the sample standard deviation of standardized conditional residuals. The five residuals are \(-0.40,-0.20,0,0.20,0.40\), with reference standard deviation one. Find the residual summary and explain its scope.

Their mean is zero and the sum of squared deviations is \(0.40\), so their sample standard deviation is \(\sqrt{0.40/4}=0.3162\). Under the specified residual convention,

$$ \text{Residual shrinkage} = 1-0.3162 = 0.6838 \approx 68.4\%. $$

This number describes the spread of these selected standardized conditional residuals relative to the stated reference scale. It is not an estimate of eta shrinkage and does not establish that all residual diagnostics are uninformative. A report should label the residual type, standardization, calculation, and number of included residuals.

Reporting and Diagnostic Checks

A useful report gives shrinkage by random-effect component, alongside the corresponding individual-level displays. Include the calculation convention, the estimated \(\hat{\omega}_k\), the number of subjects used, and any exclusions or failed individual estimates. For interpretation, name the parameter and its units when discussing the transformed individual parameter, but keep the shrinkage calculation on the random-effect scale.

1
Define the quantity.
State whether shrinkage uses standard deviations or variances and specify the empirical Bayes estimate and population variability used.
2
Check inputs.
Confirm that the estimates and \(\hat{\omega}_k\) come from the same model fit and that the subjects included in the calculation are identified.
3
Pair with the relevant displays.
Report eta shrinkage near random-effect or individual-fit plots; report any conditional-residual shrinkage separately with its own definition.
4
Qualify, do not overrule.
Use high shrinkage to limit claims about individual estimates, while still inspecting observed data, residual patterns, and population-level diagnostics.

Several checks help identify misleading summaries. A value below zero can occur when the empirical Bayes estimates are more dispersed than the fitted population standard deviation, for example because of finite-sample variability, model mismatch, or estimation instability. Do not silently truncate it to zero; verify the calculation and report the convention and result. If \(\hat{\omega}_k\) is zero or nearly zero, the ratio is undefined or unstable, so flag the issue rather than presenting a seemingly precise percentage. Also check for missing or failed estimates and for changes in the included subjects: summaries based on different subject sets are not directly comparable.

Shrinkage is descriptive, not a model-selection test or a universal quality threshold. Its value depends on the dataset, model, estimated population variability, parameterization, and estimation method. A high value can explain why individual random effects or conditional residuals should be read cautiously; a low value does not by itself validate the model or guarantee precise individual estimates.

Common Pitfall

Correction: “The empirical Bayes estimates have little spread, so the subjects must have nearly identical parameter values.” This conclusion is not justified when shrinkage is high. The estimates may be concentrated near the population mean because the observations provide limited information about individual deviations. Report the shrinkage definition and qualify individual-level interpretation; do not treat the displayed estimates as the unobserved true random effects.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. A random-effect component has \(\hat{\omega}=0.40\) and empirical Bayes estimates with sample standard deviation \(0.20\). What is the standard-deviation-based shrinkage?
  2. Why can two reports give different percentages from the same estimates and population standard deviation?
  3. A high eta-shrinkage value is reported beside individual residual profiles. What does it qualify, and what does it not establish?
  4. What should be done if a computed standard-deviation-based shrinkage value is negative?
  5. Why is it important to report the residual definition when giving a residual-shrinkage summary?

Solutions. (1) \(1-0.20/0.40=0.50\), or 50.0%. (2) One report may compare standard deviations and another variances; these are different formulas, so the convention must be named. (3) It cautions that estimated subject-specific random effects may be weakly informed and that individual displays should not be overread as evidence about true between-subject differences. It does not prove that the model is adequate or that residual patterns are absent. (4) Check the data, included subjects, estimates, and \(\hat{\omega}\); if the calculation is correct, report the negative value with its definition rather than truncating it. (5) Residual types and standardizations differ, so the chosen reference scale and calculation determine what the summary means.

Clinical Biostats