Why Look Beyond a Positive-Definite Warning?
A random-effects covariance matrix describes both the variability of individual effects and their covariation. When estimation reports that this matrix is not positive definite, the warning identifies a mathematical problem but does not, by itself, reveal its structure. One possibility is a single weak combination of random effects: most directions have substantial variability, while one particular contrast is nearly redundant. Another is broader numerical instability, in which several directions are poorly determined or the reported spectrum changes materially with numerical settings.
Eigenstructure makes that distinction visible. The eigenvalues quantify variability along orthogonal directions, and their eigenvectors identify the corresponding combinations of random effects. This is a diagnostic, not a substitute for checking the fitted model, units, and estimation behavior. In particular, a small eigenvalue does not by itself establish why the direction is weak.
For example, if the random effects are \(\eta_1\) and \(\eta_2\), the vector \(v=(1,-1)^\mathsf{T}/\sqrt{2}\) represents the normalized contrast \((\eta_1-\eta_2)/\sqrt{2}\). Its variance is \(v^\mathsf{T}Gv\). If this value is small, the fitted covariance structure assigns little variation to that contrast, even if the marginal variances of \(\eta_1\) and \(\eta_2\) are not small.
What the Spectrum Shows
For a real symmetric matrix, the spectral decomposition is \(G=V\Lambda V^\mathsf{T}\), where the columns of \(V\) are orthonormal eigenvectors and \(\Lambda\) is diagonal with the eigenvalues. If a random-effects vector \(\eta\) has mean zero and covariance \(G\), then the variance of its projection onto any unit direction \(u\) is \(u^\mathsf{T}Gu\). Expanding that direction in the eigenvector basis gives a precise reason the eigenvalues are useful.
The last equality follows because \(Gv_k=\lambda_kv_k\) and \(v_j^\mathsf{T}v_k=0\) for \(j\ne k\). Thus the variance in any unit direction is a weighted average of the eigenvalues, with nonnegative weights \(a_j^2\) summing to one. The minimum possible variance is the smallest eigenvalue, attained in its eigenvector direction. A negative eigenvalue therefore implies a direction with negative quadratic form, which is incompatible with a covariance matrix.
When all eigenvalues are positive, the spectral condition number in the Euclidean norm is \(\kappa_2(G)=\lambda_{\max}/\lambda_{\min}\). A large value indicates that the matrix has directions with very different variances and can be sensitive to perturbations. It is not a universal pass/fail criterion: the relevant scale depends on parameter units, numerical precision, and the estimation procedure.
Worked Example: One Weak Contrast
Worked Example: One Weak Contrast
Suppose a hypothetical fit estimates two dimensionless random effects, \(\eta_1\) and \(\eta_2\), with covariance matrix
The diagonal entries are the marginal variances, and the covariance is 0.039. The eigenvectors are \(v_+=(1,1)^\mathsf{T}/\sqrt{2}\) and \(v_-=(1,-1)^\mathsf{T}/\sqrt{2}\). For a matrix with diagonal \(a\) and off-diagonal \(b\), multiplying by these vectors gives eigenvalues \(a+b\) and \(a-b\), respectively. Substitution yields
The correlation is \(0.039/\sqrt{0.040(0.040)}=0.975\). The condition number is \(0.079/0.001=79\). The small eigenvalue belongs to the difference direction \((\eta_1-\eta_2)/\sqrt{2}\), while the sum direction has much larger variance. This spectrum is consistent with one comparatively weak random-effects direction, not with every direction being equally unstable.
That finding does not prove that either random effect should be removed. It indicates that the fitted covariance structure allows little variation in their contrast. The model specification, parameterization, and estimation behavior still need review before deciding what the result means.
Use Relative Scale, Not Just Raw Eigenvalues
Eigenvalues have units that depend on the random-effects coordinates. If one effect is expressed in a different unit, its numerical variance changes, and so can the eigenvalues of the covariance matrix. Consequently, comparing raw eigenvalues across differently scaled parameters can be misleading. A large raw condition number may reflect a scale disparity rather than a weak correlation structure.
One diagnostic is to standardize by marginal standard deviations. Let \(D\) be diagonal with entries \(\sqrt{G_{ii}}\), assuming these are positive. The corresponding correlation matrix is \(R=D^{-1}GD^{-1}\). Its spectrum describes dependence after each coordinate has been scaled to unit marginal variance. This transformation is useful for diagnosing correlation structure, but it does not replace examination of \(G\): a very small marginal variance may itself be substantively or numerically important.
Worked Example: A Large Raw Condition Number from Different Scales
Consider the hypothetical covariance matrix
Its eigenvalues are its diagonal entries, \(0.000001\) and \(1000000\), so the raw condition number is
That ratio is extreme, but the two effects are uncorrelated. Their standard deviations are \(0.001\) and \(1000\), reflecting very different coordinate scales. Standardizing gives \(R=D^{-1}GD^{-1}=I\), the two-dimensional identity matrix, with eigenvalues 1 and 1. Thus there is no weak correlation direction in the standardized matrix. The raw spectrum flags a scale disparity; it does not, by itself, establish widespread numerical instability. The units and plausible magnitudes of both effects must be checked before interpreting the disparity.
One Weak Direction or Several?
A useful first comparison is between the smallest eigenvalues relative to the largest eigenvalue, preferably after considering an appropriate parameter scaling. If one eigenvalue is much smaller than the others, its eigenvector isolates a candidate weak direction. If several are small, more than one independent direction is weak, which is more consistent with broad loss of numerical support in the covariance structure. “Consistent with” is important: a spectrum diagnoses geometry, not the cause of that geometry.
Worked Example: Several Weak Directions in a Standardized Matrix
Suppose a hypothetical three-effect fit has the correlation matrix
For a three-by-three matrix with diagonal 1 and common off-diagonal value \(\rho\), the all-ones direction has eigenvalue \(1+2\rho\). Any vector whose entries sum to zero has eigenvalue \(1-\rho\), because each row's off-diagonal contribution then cancels to \(-\rho\) times that row's own component. Substituting \(\rho=0.999\) gives
There are two small eigenvalues, corresponding to two independent contrasts among the three effects. For example, \((1,-1,0)^\mathsf{T}/\sqrt{2}\) is one such direction; a second independent contrast can be formed orthogonal to it and to \((1,1,1)^\mathsf{T}\). Here the weak directions are not confined to a single contrast. Since this is already a correlation matrix, the pattern cannot be dismissed simply as different marginal units. It warrants checking the fitted covariance estimates and their stability, without assuming the spectrum alone identifies the source.
Numerical Tolerance and Failure Modes
Computed eigenvalues are subject to finite-precision error. A value near zero must therefore be interpreted relative to matrix scale and the accuracy of the calculation. A common diagnostic convention is to compare each eigenvalue with a relative threshold such as \(\tau\lambda_{\max}\), where \(\tau\) is chosen for the numerical method and precision in use. This is a tolerance for diagnosis, not a universal statistical cutoff. A slightly negative eigenvalue within a defensible numerical tolerance may be indistinguishable from zero in that computation; it is not evidence that the exact fitted matrix is positive definite.
For a symmetric matrix, a materially negative eigenvalue indicates non-positive-definiteness. Before attributing it to rounding, check that the matrix is symmetric as intended, parameters use the expected units, and the reported values have not been rounded so heavily that the reconstructed matrix differs from the one used in estimation. If a negative value is close to the tolerance boundary, recompute from full-precision values and assess whether reasonable numerical changes alter the sign or magnitude.
Eigenvectors also require care. The signs of an eigenvector and its negative represent the same direction, so sign flips across runs are not meaningful by themselves. When eigenvalues are repeated or nearly repeated, individual eigenvectors within that eigenspace may rotate substantially even when the subspace is stable. In that case, interpret the weak subspace as a whole rather than claiming one uniquely identified contrast.
Use the full-precision random-effects covariance estimates, confirm symmetry and parameter ordering, and record the units of the random effects.
Compare each value with the largest eigenvalue and with a stated numerical tolerance. Do not classify a direction from an unscaled absolute cutoff alone.
Examine the loadings in eigenvectors for small eigenvalues. One isolated small value suggests one weak direction; multiple small values indicate a weak subspace of higher dimension.
Check whether the spectrum and weak directions persist when calculations use full precision and a defensible scaling. A diagnosis that changes sharply with such choices is itself evidence of numerical sensitivity.
How to Use the Diagnosis
Eigenstructure complements, rather than replaces, the earlier material on non-positive-definite random-effects covariance. A direct positive-definiteness check answers whether a matrix meets the mathematical condition. Eigenanalysis adds information about how many directions are weak and which combinations they involve. The covariance matrix's marginal variances and correlations remain useful summaries, but neither reveals every weak contrast as directly as the eigenvectors do.
Common failure modes include treating a small eigenvalue as proof that a random effect is unnecessary, interpreting a raw condition number without checking units, and calling any small negative computed eigenvalue a substantive model defect. The correction is to use the eigenvalue and eigenvector together, assess scale and numerical tolerance, and describe the result narrowly: for example, “one contrast has much less estimated variance than the other direction,” not “the model is invalid.”
This diagnostic has limits. A covariance spectrum does not establish whether the data support a parameter combination, identify the cause of weak estimation, or determine which model change is appropriate. It also does not guarantee that a positive-definite matrix is numerically well behaved. Its value is to localize the geometry of the covariance problem and guide more targeted investigation.
Check Your Understanding
Answer each question, then compare with the solutions below.
- If a two-effect covariance matrix has one eigenvalue far smaller than the other, what does its eigenvector tell you?
- Why can a very large raw condition number be misleading when random effects use very different units?
- In the three-effect correlation example, how many independent weak directions are indicated?
- What does a materially negative eigenvalue imply about a symmetric covariance matrix?
Solutions. (1) It identifies the particular linear combination of random effects with the smallest variance; the eigenvector and its negative denote the same direction. (2) Rescaling coordinates changes the covariance matrix's numerical eigenvalues, so the ratio may reflect different marginal scales rather than weak correlation structure; inspect units and a standardized matrix as well. (3) Two small eigenvalues indicate a two-dimensional weak subspace, corresponding to two independent contrasts. (4) There is a direction with a negative quadratic form, so the matrix is not positive semidefinite and cannot be a valid covariance matrix as stated; check full-precision values and numerical tolerance before deciding whether the negative value is substantive or computational.