Why Factor a Random-Effects Covariance Matrix?
In an NLME model, a vector of subject-level random effects can represent how several individual parameters jointly depart from their typical values. The matrix \(\Omega\) describes their variances and covariances. When random effects are correlated, a valid covariance matrix must satisfy more than symmetry: it must also be positive definite if the model assumes a nonsingular multivariate normal distribution.
The Cholesky parameterization expresses \(\Omega\) as a product of a lower-triangular matrix and its transpose. This gives a direct way to build a valid covariance matrix from a set of factor entries. It also makes clear how correlated effects can arise from underlying independent standard normal variables.
For a vector of random effects \(\eta\), the usual covariance specification is \(\eta\sim N(0,\Omega)\), where the zero vector is the mean and \(\Omega\) is the covariance matrix. The factorization gives an equivalent construction: if \(z\sim N(0,I)\), then \(\eta=Lz\) has covariance \(\Omega\). Indeed, \(E(\eta)=0\) and
Thus, the factor does not remove correlation from the model. It constructs correlated random effects by combining independent standard normal components.
How the Factor Guarantees Positive Definiteness
Suppose \(L\) is lower triangular with positive diagonal entries. For any nonzero vector \(x\),
The last inequality holds because a triangular matrix with nonzero diagonal is invertible, so \(L^Tx\ne 0\) whenever \(x\ne 0\). Therefore \(LL^T\) is positive definite. This is the key computational advantage: choosing a lower-triangular factor with positive diagonal entries automatically produces a valid, nonsingular covariance matrix.
For a two-dimensional factor,
The diagonal entries of \(\Omega\) are variances, and its off-diagonal entries are covariances. The entries of \(L\), in contrast, are factor parameters; they are not generally variances, standard deviations, or correlations. For example, the first variance is \(l_{11}^2\), while the second includes contributions from both \(l_{21}\) and \(l_{22}\).
Worked Example: Constructing a Factor From Two Variances and a Correlation
Suppose two hypothetical log-scale random effects have variances \(0.0400\) and \(0.0900\), and correlation \(-0.500\). Find their covariance matrix and a Cholesky factor.
The standard deviations are \(\sqrt{0.0400}=0.2000\) and \(\sqrt{0.0900}=0.3000\). The covariance is the correlation multiplied by the two standard deviations:
Therefore,
Set \(l_{11}=\sqrt{0.0400}=0.2000\). The upper-right entry of \(L\) is zero by definition, and \(l_{21}\) must satisfy \(l_{11}l_{21}=-0.03000\), so \(l_{21}=-0.1500\). Finally, \(l_{21}^2+l_{22}^2=0.0900\), giving \(l_{22}=\sqrt{0.0900-0.02250}=0.2598\), taking the positive root. Thus,
Multiplication gives \(LL^T\) with diagonal entries \(0.0400\) and \(0.02250+0.06750=0.0900\), and off-diagonal entries \((0.2000)(-0.1500)=-0.03000\). The factor reproduces the stated covariance matrix.
Recovering a Factor and Justifying the Construction
For a general \(p\)-dimensional positive-definite matrix, the entries of the factor can be found successively. For \(i\ge j\), the recursion is
where \(\omega_{ij}\) is the \((i,j)\) entry of \(\Omega\). The positive square root is used for every diagonal entry. Positive definiteness ensures each quantity under a square root is positive, so the recursion can proceed.
A brief block argument explains why the factorization exists for every positive-definite matrix. Assume the leading \((p-1)\)-dimensional block \(A\) has factorization \(A=RR^T\), and write the full matrix as \(\Omega=\begin{pmatrix}A&b\\b^T&d\end{pmatrix}\). Set \(v=R^{-1}b\). The scalar \(d-v^Tv=d-b^TA^{-1}b\) is positive: evaluate the positive quadratic form of \(\Omega\) at the nonzero vector \(\begin{pmatrix}-A^{-1}b\\1\end{pmatrix}\), which gives exactly \(d-b^TA^{-1}b>0\). Hence
has positive diagonal and direct multiplication gives \(LL^T=\Omega\). Starting with the one-dimensional case and applying this argument successively establishes existence. The recursion also determines each entry in order, and the positive diagonal requirement fixes each square-root choice, establishing uniqueness.
Worked Example: Recovering a Three-Effect Factor
Consider the hypothetical covariance matrix
Use the recursion to recover \(L\). First, \(l_{11}=\sqrt{0.0400}=0.2000\). Then \(l_{21}=0.02000/0.2000=0.1000\), and \(l_{31}=-0.008000/0.2000=-0.04000\). The second diagonal entry is
The next entry is \(l_{32}=[0.01400-(-0.04000)(0.1000)]/0.3000=0.01800/0.3000=0.06000\). The final diagonal entry is
The resulting factor is
For a check, the covariance between the second and third effects is \(l_{21}l_{31}+l_{22}l_{32}=(0.1000)(-0.04000)+(0.3000)(0.06000)=0.01400\). The third variance is \(l_{31}^2+l_{32}^2+l_{33}^2=0.001600+0.003600+0.06250=0.06770\). The remaining products reproduce the other entries of \(\Omega\).
Using the Parameterization in NLME Models
An estimation procedure can work with the entries of \(L\) and compute \(\Omega=LL^T\) whenever it needs the covariance matrix. The off-diagonal entries of \(L\) may be positive, negative, or zero. The diagonal entries must remain positive; a common strategy is to represent each diagonal as the exponential of an unconstrained parameter. The exact implementation varies, but the purpose is the same: prevent the optimizer from proposing a factor that would produce an invalid covariance matrix.
If random effects have different units, the factor entries carry units implied by the products that form \(\Omega\). In common NLME specifications where the random effects are deviations on log scales, they are dimensionless. In either case, read the implied \(\Omega\) to interpret variances and covariances; do not interpret an off-diagonal entry of \(L\) as the correlation between two effects.
The factor depends on the ordering of the random effects. Reordering the effects generally changes \(L\), even when the reordered covariance matrix describes the same relationships. This is expected: \(L\) is a computational representation of \(\Omega\), not an order-free summary of the pairwise associations.
Diagnostics, Alternatives, and Limitations
A Cholesky parameterization ensures mathematical positive definiteness when its diagonal entries are positive, but it does not ensure that the data contain enough information to estimate every covariance reliably. Inspect the fitted covariance matrix, its standard deviations and correlations, and any convergence or numerical warnings. Very small diagonal elements, correlations close to \(1\) or \(-1\), large changes under small data or starting-value changes, and unstable estimates can indicate a nearly singular matrix or weak information about some combinations of effects.
A positive-definite matrix has strictly positive eigenvalues. If a computed matrix has a zero or negative eigenvalue, it is not strictly positive definite; rounding can also make a nearly singular matrix appear invalid. The Cholesky algorithm may fail or become numerically unstable when a pivot is nonpositive or very small. Such behavior should prompt investigation of numerical precision, the fitted model, and the information available in the data, rather than an assumption that the factorization itself has repaired the problem.
One alternative is to estimate variances and correlations directly. For two effects, this is straightforward if the correlation is constrained to lie between \(-1\) and \(1\). In higher dimensions, however, individually permissible pairwise correlations do not necessarily combine into a positive-definite correlation matrix. Directly estimating covariance entries likewise requires constraints to keep the complete matrix valid. The Cholesky approach enforces validity through the factor, though its entries may be less directly interpretable than standard deviations and correlations.
Worked Example: Checking a Factor and Interpreting the Result
Suppose a hypothetical fitted two-effect factor is \(L=\begin{pmatrix}0.3000&0\\0.1200&0.4000\end{pmatrix}\). Calculate the implied covariance matrix and correlation.
Multiplying gives \(\Omega=LL^T=\begin{pmatrix}0.09000&0.03600\\0.03600&0.1744\end{pmatrix}\), since the second variance is \(0.1200^2+0.4000^2=0.01440+0.1600=0.1744\). The implied standard deviations are \(0.3000\) and \(\sqrt{0.1744}=0.4176\). Therefore, the correlation is
The effects have a positive covariance and an implied correlation of about \(0.2874\). The factor entry \(0.1200\) is not that correlation; it contributes to the covariance through multiplication with the first diagonal entry.
Check Your Understanding
Try each question, then compare your reasoning with the solutions below.
- State the condition on \(L\) that guarantees \(LL^T\) is positive definite, and give the quadratic-form argument.
- For \(L=\begin{pmatrix}0.4000&0\\-0.1000&0.3000\end{pmatrix}\), calculate \(\Omega\).
- Why must the diagonal entries of a Cholesky factor be positive rather than merely nonzero in the standard unique factorization?
- Explain why valid pairwise correlations do not, by themselves, guarantee a valid covariance matrix when there are three or more effects.
Solutions. 1. \(L\) must be lower triangular with strictly positive diagonal. For nonzero \(x\), \(x^TLL^Tx=\|L^Tx\|^2>0\), because \(L^T\) is invertible. 2. Multiplication gives \(\Omega=\begin{pmatrix}0.1600&-0.04000\\-0.04000&0.1000\end{pmatrix}\): the second variance is \((-0.1000)^2+(0.3000)^2=0.1000\). 3. Square roots in the recursive construction have two signs; requiring positive diagonal chooses one sign at every step and makes the factor unique. 4. Positive definiteness is a condition on the whole matrix, not just each pair in isolation. A collection of pairwise correlations can make a quadratic form nonpositive for some nonzero vector, so the resulting matrix would not be a valid nonsingular covariance matrix.