From Fitted-Model Output to Eta Shrinkage
Eta shrinkage is calculated after fitting a population model, using two pieces of information for each random effect: the estimated population variance and the spread of the subjects’ empirical Bayes estimates (EBEs). The calculation is short, but errors in identifying the right variance, matching the parameter, or handling rounding can materially change the reported result. The goal here is to make that calculation transparent and reproducible.
For random effect \(j\), the population model assigns a variance \(\omega_j^2\) to the latent subject effects. The fitted model also produces an EBE \(\hat{\eta}_{ij}\) for each subject \(i\). These EBEs are estimates conditional on the fitted model and the subject’s data; their observed spread is generally not the same as the estimated population spread. Eta shrinkage summarizes the difference between those spreads.
The formula can also be calculated as one minus the ratio of standard deviations: \(\widehat{S}_{\eta,j}=1-s_{\hat{\eta},j}/\hat{\omega}_j\), where \(s_{\hat{\eta},j}=\sqrt{s_{\hat{\eta},j}^2}\) and \(\hat{\omega}_j=\sqrt{\hat{\omega}_j^2}\). This form is useful when software reports the EBE standard deviation and the random-effect standard deviation rather than both variances. It does not change the calculation: compare standard deviation with standard deviation, or variance with variance.
What to Extract Before Calculating
First identify the random effect of interest, such as the eta on clearance, and locate its estimated variance in the fitted model. If the output provides a random-effect covariance matrix, use the diagonal element for that effect, \(\hat{\omega}_{jj}\), which is its marginal variance. Do not use an off-diagonal covariance as the denominator. If output instead gives the random-effect standard deviation, use it directly in the standard-deviation version of the formula, or square it before using the variance version.
Next obtain one EBE for each included subject and calculate their sample variance. The sample variance is
The variance is calculated around the mean of the EBEs, not by averaging their squared values unless their mean is exactly zero. The EBE mean need not be exactly zero in a finite fitted data set. Confirm that the EBE summary includes the intended subjects and that any excluded, missing, or non-estimable EBEs are handled consistently with the analysis being reported.
Worked Example: Calculating Shrinkage From Two Reported Variances
Suppose a hypothetical fitted model reports an eta variance for clearance of \(\hat{\omega}_{CL}^2=0.2500\). The sample variance of the clearance EBEs is \(s_{\hat{\eta},CL}^2=0.1764\). Calculate eta shrinkage.
The two values are variances for the same random effect, so substitute them directly:
Thus the estimated eta shrinkage for clearance is \(16.00\%\). Equivalently, the EBE standard deviation is \(\sqrt{0.1764}=0.4200\), while the population random-effect standard deviation is \(\sqrt{0.2500}=0.5000\); their ratio is \(0.4200/0.5000=0.8400\), leaving \(1-0.8400=0.1600\). The calculation does not use \(0.4200\) as the square root of the variance ratio: the square root of \(0.1764/0.2500\) is \(0.8400\).
Calculating the EBE Variance From Subject-Level Values
Some output provides the EBEs but not their variance. In that case, calculate the sample variance explicitly before applying the shrinkage formula. Keeping the deviations, squared deviations, and divisor visible is a useful check on arithmetic and on the chosen variance convention.
Worked Example: Computing the Sample Variance First
For a hypothetical study with five subjects, suppose the EBEs for one random effect are \(-0.30,-0.10,0.00,0.10,0.30\), and the fitted model estimates \(\hat{\omega}_j^2=0.1600\). Calculate shrinkage using the sample variance.
The EBE mean is \(\bar{\hat{\eta}}_j=(-0.30-0.10+0.00+0.10+0.30)/5=0\). The sum of squared deviations is \(0.09+0.01+0+0.01+0.09=0.20\). There are five subjects, so the sample variance uses divisor \(5-1=4\):
The estimated eta shrinkage is \(44.10\%\). The EBE standard deviation is approximately \(0.2236\), and the estimated population standard deviation is \(0.4000\); \(1-(0.2236/0.4000)\) gives approximately \(0.4410\). Both routes agree up to rounding.
Variance Conventions, Rounding, and Reporting
The sample-variance convention matters. The formula above defines \(s_{\hat{\eta},j}^2\) with divisor \(n-1\). A software summary may instead report a variance calculated with divisor \(n\), or may use another documented convention. Do not assume that any value labelled “variance of EBEs” is the sample variance required here. Check the software documentation or calculate the variance from the subject-level EBEs using the stated convention. If the two conventions are mixed, the shrinkage can differ, especially when the number of subjects is small.
Worked Example: Checking the Divisor in a Small Sample
Suppose three hypothetical EBEs for one random effect are \(-0.20,0.00,0.20\), and the model estimates \(\hat{\omega}_j^2=0.0900\). Their mean is zero and the sum of squared deviations is \(0.0400+0+0.0400=0.0800\). The sample variance is \(0.0800/(3-1)=0.0400\). Therefore,
Using the sample-variance convention, estimated shrinkage is \(33.33\%\). If a reported EBE variance instead used divisor \(n=3\), it would be \(0.0800/3=0.02667\). Substituting that value would give \(1-\sqrt{0.02667/0.0900}\approx 0.4557\), or \(45.57\%\). That is not a rounding discrepancy; it results from using a different variance convention. State which convention was used and use it consistently.
Keep sufficient precision in intermediate steps. For example, compute the variance ratio and its square root from unrounded values, then round the final shrinkage for reporting. Rounding both variances too aggressively can alter the ratio, particularly when the EBEs have little spread or the variance estimates are small. Report the percentage with an appropriate number of significant figures and name the random effect. Eta values are often dimensionless, but the result should still be identified by its parameter, such as “clearance eta shrinkage.”
Shrinkage is parameter-specific. A model with several random effects can have quite different shrinkage estimates for different effects, so one value should not be presented as though it describes the entire model.
Worked Example: Reporting Shrinkage Separately by Parameter
A hypothetical model reports the following EBE sample variances and fitted random-effect variances:
| Random effect | EBE sample variance | Fitted random-effect variance |
|---|---|---|
| Clearance | 0.1764 | 0.2500 |
| Volume | 0.1024 | 0.6400 |
For clearance, \(1-\sqrt{0.1764/0.2500}=1-0.8400=0.1600\), or \(16.00\%\). For volume, \(1-\sqrt{0.1024/0.6400}=1-\sqrt{0.1600}=1-0.4000=0.6000\), or \(60.00\%\). The appropriate report gives both results and labels them: estimated eta shrinkage is \(16.00\%\) for clearance and \(60.00\%\) for volume. Combining or averaging these values would conceal the parameter-specific difference and would not be the result of the defined calculation.
Interpretation, Diagnostics, and Limitations
A value near zero means the EBE standard deviation is close to the fitted population standard deviation under this calculation. A larger positive value means the EBE distribution is narrower relative to the fitted random-effect distribution. The value is a descriptive summary of fitted-model output; it is not a test of a hypothesis, a confidence interval, or a direct estimate of the accuracy of each subject’s EBE.
The calculation relies on a positive fitted random-effect variance and a usable set of subject-level EBEs for the corresponding effect. It also presumes that the variance of those EBEs and the model variance are on the same scale and refer to comparable subjects and the same model fit. If output is taken from different runs, different subsets of subjects, or different parameter transformations, the resulting ratio has no clear interpretation as the stated shrinkage estimate.
The computed value can be negative if the sample variance of EBEs exceeds the fitted random-effect variance. For example, if \(s_{\hat{\eta},j}^2=0.1210\) and \(\hat{\omega}_j^2=0.1000\), then \(1-\sqrt{1.210}\approx -0.1000\), or about \(-10.00\%\). This can occur through finite-sample variation or estimation behavior. Do not silently replace a negative result with zero; report the calculation and check the inputs and fit. Conversely, if the EBE variance is zero while the fitted random-effect variance is positive, the formula gives \(100\%\). If the fitted random-effect variance is exactly zero, the ratio is undefined; do not report a value from this formula.
Useful checks include verifying the random-effect label, confirming whether a listed quantity is a variance or standard deviation, recomputing the EBE variance from the individual values, checking the divisor, and repeating the arithmetic without premature rounding. Residual and observed-versus-predicted diagnostic plots provide other information about model fit, but they do not replace this calculation or validate its inputs.
Common Mistakes and Alternatives
- Using the variance ratio without its square root. The defined formula compares standard deviations. Calculate \(1-\sqrt{s_{\hat{\eta},j}^2/\hat{\omega}_j^2}\), not \(1-s_{\hat{\eta},j}^2/\hat{\omega}_j^2\).
- Confusing variance and standard deviation. If the output gives \(\hat{\omega}_j\), use it in the standard-deviation ratio. If it gives \(\hat{\omega}_j^2\), use the variance formula. Do not take an extra square root or omit one.
- Using a variance for the wrong eta. Match the EBE variance to the corresponding diagonal element of the random-effect variance matrix.
- Ignoring the EBE mean or the variance divisor. Calculate deviations from the observed EBE mean and use the stated sample-variance convention.
- Forcing every result into the range zero to one. A negative estimate is possible under the formula and should prompt checks, not automatic truncation.
The standard-deviation form is the direct alternative when output provides standard deviations: \(1-s_{\hat{\eta},j}/\hat{\omega}_j\). It is algebraically identical to the variance form when the same values and conventions are used. A report may also present the EBE variance and fitted random-effect variance alongside shrinkage so readers can verify the calculation. These are complementary ways to show the same variance-based summary, not different definitions.
Check Your Understanding
Work each calculation before reading the solutions.
- A fitted model has \(\hat{\omega}_j^2=0.3600\) and EBE sample variance \(0.2025\). Calculate eta shrinkage as a percentage.
- Five EBEs are \(-0.20,-0.10,0,0.10,0.20\). Calculate their sample variance using divisor \(n-1\).
- Output gives an EBE standard deviation of \(0.24\) and a fitted random-effect standard deviation of \(0.30\). Calculate shrinkage.
- Why should the EBE variance for volume not be paired with the fitted variance for clearance?
- Suppose \(s_{\hat{\eta},j}^2=0.1444\) and \(\hat{\omega}_j^2=0.1225\). Calculate the result and state how it should be handled.
Solutions. (1) \(1-\sqrt{0.2025/0.3600}=1-\sqrt{0.5625}=1-0.7500=0.2500\), or \(25.00\%\). (2) The mean is zero; the sum of squares is \(0.04+0.01+0+0.01+0.04=0.10\), so the sample variance is \(0.10/(5-1)=0.02500\). (3) \(1-(0.24/0.30)=0.2000\), or \(20.00\%\). (4) The numerator and denominator must describe the same random effect; pairing different parameters makes the ratio incompatible with the definition. (5) \(1-\sqrt{0.1444/0.1225}=1-\sqrt{1.1788}\approx 1-1.0857=-0.0857\), or approximately \(-8.57\%\). Report the negative calculation rather than truncating it, and check the matched inputs and fitted output.