Tutorials › Population Pharmacokinetics › Deriving The Variance-Based Eta Shrinkage Formula

Diagnostics: Goodness of Fit and Shrinkage · Tutorial 352 of 599

Deriving The Variance-Based Eta Shrinkage Formula

Learn how the common eta-shrinkage formula follows from comparing the spread of empirical Bayes estimates with the model-estimated random-effect spread.

Intermediate 9 min read

What You'll Learn

  • Define the random-effect variance and the empirical Bayes estimate variance used in the calculation.
  • Derive the standard-deviation form of the eta-shrinkage formula from a variance ratio.
  • Calculate eta shrinkage from small hypothetical datasets, including one with a nonzero sample mean.
  • Distinguish standard-deviation shrinkage from a variance-deficit calculation.
  • Recognize negative estimates and other situations where the formula needs cautious interpretation.

Why Compare Two Variances?

An empirical Bayes estimate (EBE) for an individual’s random effect is informed by both that individual’s observations and the population model. The resulting estimates may vary less across individuals than the underlying random effects are assumed to vary in the population. Eta shrinkage summarizes that reduction in spread for a particular random-effect component.

The earlier material on defining eta shrinkage from empirical Bayes estimates introduced the idea of comparing EBE dispersion with population random-effect dispersion. Here, the comparison is derived explicitly from the variances. The key point is that the common formula measures the fraction of standard deviation not retained by the EBEs, even though the calculation may begin with variances.

Definition: For a random-effect component \(\eta\), let \(\hat\omega^2\) be its estimated population variance and let \(s^2_{\hat\eta}\) be the sample variance of its EBEs across \(n\) individuals. The variance-based eta-shrinkage estimate is \(\widehat{ES}_\eta = 1-\sqrt{s^2_{\hat\eta}/\hat\omega^2}\). As a percentage, report \(100\widehat{ES}_\eta\%\). The quantity inside the square root is the ratio of EBE variance to estimated population variance.

Assumptions and Quantities in the Formula

In a standard population model, the random effect for individual \(i\) is written as \(\eta_i\), with population mean zero and variance \(\omega^2\). For the calculation, the model provides an estimate \(\hat\omega^2>0\). This is a variance, so its square root, \(\sqrt{\hat\omega^2}\), is the estimated population standard deviation of that random-effect component.

The EBEs, written \(\hat\eta_i\), are on the same scale as \(\eta_i\). Their sample variance is calculated across the same set of individuals used for the comparison:

$$ s^2_{\hat\eta} = \frac{\sum_{i=1}^{n}(\hat\eta_i-\bar{\hat\eta})^2}{n-1}, \qquad \bar{\hat\eta} = \frac{1}{n}\sum_{i=1}^{n}\hat\eta_i. $$

This definition centers the variance on the sample mean of the EBEs. A finite set of EBEs need not have a mean exactly equal to zero, even when the population random effect is modeled with mean zero. Centering makes the calculation a measure of their observed spread rather than a mixture of spread and offset. Software implementations can differ in their variance convention, so a reported value should be interpreted using the convention actually used.

The formula is meaningful when \(\hat\omega^2\) is positive, and it requires the two variances to refer to the same random-effect component, parameterization, and scale. For example, if the random effect is defined on a log scale, both variances must be on that log scale. If a random-effect covariance matrix is used, the comparison for one component uses its marginal variance, not a variance from a different component.

The arithmetic itself does not require the EBEs to be normally distributed. The usual population-model interpretation does rely on treating \(\hat\omega^2\) as the model’s estimate of the population variability for the specified random effect. The formula is a descriptive comparison, not a test of a null hypothesis and not a direct estimate of each individual’s true random effect.

Deriving the Standard-Deviation Formula

Start with the relative EBE spread: the standard deviation of the EBEs divided by the estimated population standard deviation. This ratio describes the fraction of population-scale variability represented by the EBE spread. Eta shrinkage is defined as the amount by which that relative spread falls short of one.

$$ \text{relative EBE spread} = \frac{s_{\hat\eta}}{\sqrt{\hat\omega^2}} = \frac{\sqrt{s^2_{\hat\eta}}}{\sqrt{\hat\omega^2}} = \sqrt{\frac{s^2_{\hat\eta}}{\hat\omega^2}}. $$

Subtracting this retained fraction from one gives the common formula:

$$ \widehat{ES}_\eta = 1-\frac{s_{\hat\eta}}{\sqrt{\hat\omega^2}} = 1-\sqrt{\frac{s^2_{\hat\eta}}{\hat\omega^2}}. $$

The square root is essential: the definition compares standard deviations, not variances. If EBE variance is one quarter of the estimated population variance, then EBE standard deviation is one half of the population standard deviation, and the formula gives \(1-0.5=0.5\), or 50% shrinkage. Simply subtracting the variance ratio from one would give 75%, which is a different quantity.

Key result: The common variance-based calculation is \(1-\sqrt{s^2_{\hat\eta}/\hat\omega^2}\). It is equivalent to one minus the EBE sample standard deviation divided by the estimated population standard deviation. It is not \(1-s^2_{\hat\eta}/\hat\omega^2\).

Worked Calculations

Worked Example: A Centered Set of EBEs

Suppose a hypothetical fitted model estimates \(\hat\omega^2=0.50\) for one random-effect component. For five hypothetical individuals, the EBEs are \(-0.60,-0.20,0.00,0.20,0.60\). Calculate eta shrinkage using the sample variance.

The EBE mean is zero. The sum of squared deviations from that mean is \(0.36+0.04+0+0.04+0.36=0.80\). Therefore,

$$ s^2_{\hat\eta} = \frac{0.80}{5-1} = 0.200. $$

The variance ratio is \(0.200/0.50=0.400\). Taking its square root gives the relative standard deviation, \(\sqrt{0.400}=0.6325\). Thus,

$$ \widehat{ES}_\eta = 1-\sqrt{\frac{0.200}{0.50}} = 1-0.6325 = 0.3675. $$

The estimated eta shrinkage is 0.3675, or 36.75%. In this dataset, the EBE sample standard deviation is about 63.25% of the estimated population standard deviation. The result describes these two spreads; it does not say that each individual’s EBE is 36.75% closer to zero.

Worked Example: EBEs With a Nonzero Sample Mean

For a second hypothetical dataset, suppose \(\hat\omega^2=0.36\) and four EBEs are \(-0.40,-0.10,0.10,0.50\). Use the centered sample variance rather than assuming the observed EBE mean is exactly zero.

The mean is \(({-0.40-0.10+0.10+0.50})/4=0.025\). The deviations are \(-0.425,-0.125,0.075,0.475\); their squared values sum to \(0.4275\). Hence,

$$ s^2_{\hat\eta} = \frac{0.4275}{4-1} = 0.1425. $$

The variance ratio is \(0.1425/0.36=0.3958\), and the relative standard deviation is \(\sqrt{0.3958}=0.6292\). The shrinkage estimate is

$$ \widehat{ES}_\eta = 1-\sqrt{\frac{0.1425}{0.36}} = 1-0.6292 = 0.3708. $$

The result is approximately 37.08%. The small nonzero sample mean does not enter the final comparison as an added squared term because the sample variance is centered on that mean.

Worked Example: A Negative Estimate

Suppose a third hypothetical analysis gives \(\hat\omega^2=0.40\), while four EBEs are \(-0.90,-0.30,0.30,0.90\). Their mean is zero, and the sum of squared deviations is \(0.81+0.09+0.09+0.81=1.80\). The sample variance is

$$ s^2_{\hat\eta} = \frac{1.80}{4-1} = 0.600. $$

The variance ratio is \(0.600/0.40=1.50\), so the relative standard deviation is \(\sqrt{1.50}=1.225\). Therefore,

$$ \widehat{ES}_\eta = 1-\sqrt{1.50} = -0.2247. $$

The estimate is \(-22.47\%\). This does not mean that a physical shrinkage process has reversed. It means that this sample’s EBE spread exceeds the model-estimated population spread, so the formula produces a negative descriptive estimate. The calculation should be reported and investigated rather than silently changed to zero.

Checking the Calculation and Interpreting Its Limits

A useful arithmetic check is to compare the variance ratio and the retained standard-deviation fraction. If \(r=s^2_{\hat\eta}/\hat\omega^2\), then the retained fraction is \(\sqrt{r}\), and shrinkage is \(1-\sqrt{r}\). For \(0\leq r\leq1\), the estimate lies between zero and one. At \(r=1\), it is zero; at \(r=0\), it is one. If \(r>1\), it is negative.

The metric is a compact summary, but it is not a substitute for checking how it was calculated. Important checks include:

  • Match the component and scale. Do not compare one parameter’s EBE spread with another parameter’s random-effect variance, or mix log-scale and natural-scale quantities.
  • Verify the variance convention. Confirm whether the EBE variance is centered on the sample mean and whether the denominator is \(n-1\) or another convention. Use the convention stated for the analysis.
  • Check the number and identity of individuals. The EBE variance should be calculated across the intended set of individuals, without accidentally mixing estimates from different analyses or components.
  • Investigate unusual ratios. A negative value can result from an EBE spread larger than the estimated population spread. A zero estimated population variance makes this ratio undefined; do not divide by zero or present a finite shrinkage value from this formula.

The comparison is sensitive to both quantities in its ratio. It does not isolate why the EBE spread is smaller or larger, and it does not quantify uncertainty in the shrinkage estimate. With few individuals, the sample variance itself may be unstable. In addition, a single summary can conceal the distribution of the EBEs. These limitations matter when comparing values across components or analyses: a difference in the reported percentage is not, by itself, proof of a difference in individual information or model quality.

Common Mistake: Subtracting the Variance Ratio

A frequent error is to calculate \(1-s^2_{\hat\eta}/\hat\omega^2\) and label it the common eta-shrinkage formula. That expression compares variances. The common formula compares standard deviations, so the square root must be applied to the variance ratio before subtracting from one.

For example, if the EBE variance is \(0.20\) and the estimated population variance is \(0.50\), then the variance ratio is \(0.40\). The common estimate is \(1-\sqrt{0.40}=0.3675\), or 36.75%, not \(1-0.40=0.60\), or 60%. Always identify whether the intended measure is defined on the variance scale or standard-deviation scale before interpreting a percentage.

1
Identify the component.
Record the model-estimated variance \(\hat\omega^2\) and the EBEs \(\hat\eta_i\) for that same random-effect component.
2
Calculate EBE spread.
Compute the mean and the sample variance \(s^2_{\hat\eta}\) across the intended individuals, using the stated variance convention.
3
Form the ratio and take its square root.
Calculate \(s^2_{\hat\eta}/\hat\omega^2\), then take the square root to obtain the relative standard deviation.
4
Subtract from one and check.
Calculate \(1-\sqrt{s^2_{\hat\eta}/\hat\omega^2}\), convert to a percentage if useful, and inspect whether the result is negative or undefined.

Check Your Understanding

Work each problem, then compare your reasoning with the solutions below.

  1. A hypothetical analysis has \(\hat\omega^2=0.25\) and \(s^2_{\hat\eta}=0.09\). Calculate the common eta-shrinkage estimate.
  2. Why does the common formula take the square root of the variance ratio?
  3. For hypothetical EBEs \(-0.20,0.00,0.20\), calculate the sample variance and eta shrinkage if \(\hat\omega^2=0.20\).
  4. A calculated shrinkage estimate is negative. What does that imply about the two spreads, and should the result automatically be set to zero?

Solutions. (1) The variance ratio is \(0.09/0.25=0.36\); its square root is \(0.60\), so shrinkage is \(1-0.60=0.40\), or 40%. (2) The definition compares standard deviations, and the standard-deviation ratio is the square root of the variance ratio. (3) The EBE mean is zero; the sum of squared deviations is \(0.04+0+0.04=0.08\), so \(s^2_{\hat\eta}=0.08/(3-1)=0.040\). The variance ratio is \(0.040/0.20=0.20\), giving shrinkage \(1-\sqrt{0.20}=0.5528\), or 55.28%. (4) A negative estimate means the EBE sample variance exceeds the estimated population variance. It should not automatically be set to zero; report the calculation and check the quantities and conventions used.

Clinical Biostats