Why Parameterize the Covariance?
In a nonlinear mixed-effects model, a subject’s random-effect vector can contain several related quantities, such as deviations in clearance and volume. Their covariance matrix describes both the variability of each component and the dependence between components. During Bayesian sampling, however, a proposed matrix must be a valid covariance matrix: it must be symmetric and positive definite. Proposing its entries independently can violate that requirement, producing a matrix that cannot describe any multivariate normal random effect.
A Cholesky parameterization represents the covariance through a triangular factor. This changes the sampling problem: instead of proposing covariance entries that must jointly satisfy positive-definiteness constraints, one works with factor entries that construct a valid covariance matrix by design.
Here, \(I_q\) is the \(q\)-by-\(q\) identity matrix. The usual model assumptions for this representation are that, conditional on the population parameters, the subject effects have mean zero and covariance \(\Omega\), and that the components of \(z_i\) are independent standard normal variables. If subjects are modeled as independent, their \(z_i\) vectors are independent across subjects as well. The Cholesky transformation represents this multivariate normal distribution; it does not itself establish that the normal random-effects assumption is appropriate for the data.
How the Factor Guarantees a Valid Covariance
For a two-component random effect, write the lower-triangular factor as \(L\). Multiplication gives the covariance matrix:
The diagonal of \(\Omega\) gives the two variances, and the off-diagonal entries give their covariance. Notice that the entries of \(L\) are generally not the covariance entries: for example, the second variance is \(\ell_{21}^2+\ell_{22}^2\), not \(\ell_{22}\).
This is the key guarantee. The factor can be parameterized with unrestricted real values below its diagonal and positive diagonal values—for example, by sampling unconstrained values \(a_{jj}\) and setting \(\ell_{jj}=\exp(a_{jj})\). The exponential is positive for every finite \(a_{jj}\), so the resulting factor is nonsingular and its covariance is positive definite. A Cholesky factor with a zero diagonal would instead yield a singular, positive-semidefinite matrix, which lies on the boundary rather than in the positive-definite interior.
Worked Example: Recovering Variances and Correlation
Suppose two hypothetical dimensionless random effects have Cholesky factor \(L=\begin{pmatrix}0.4&0\\0.3&0.5\end{pmatrix}\). Calculate their covariance matrix, standard deviations, and correlation.
Covariance matrix. Multiply the factor by its transpose:
The standard deviations are \(\sqrt{0.16}=0.4\) and \(\sqrt{0.34}\approx0.5831\). Therefore the correlation is \(0.12/(0.4\times0.5831)\approx0.5145\). The positive diagonal entries of \(L\) also show directly that the constructed covariance is positive definite.
Generating Correlated Random Effects
The same factor gives a convenient way to generate random effects. Draw independent standard normal components in \(z_i\), then multiply by \(L\). The resulting components are generally correlated, even though the components of \(z_i\) are independent.
Worked Example: Transforming a Standard Normal Draw
Use the factor from the previous example and suppose a hypothetical standard normal draw is \(z_i=(1,-2)^\mathsf{T}\). Calculate the corresponding random effects.
The transformation is \(\eta_i=Lz_i\):
The first random effect is \(0.4\) and the second is \(-0.7\), both dimensionless in this hypothetical example. Across repeated draws, their variances and covariance are the entries of \(LL^\mathsf{T}\), not the entries of any one realized vector. In a noncentered formulation, \(z_i\) is the standard normal latent variable and the multiplication by \(L\) maps it to the model’s random-effect scale.
A scale-and-correlation representation is another useful way to interpret the same construction. If \(D=\operatorname{diag}(\sigma_1,\ldots,\sigma_q)\) contains random-effect standard deviations and \(R\) is a correlation matrix, then \(\Omega=DRD\). If \(R=L_RL_R^\mathsf{T}\), a compatible covariance factor is \(L=DL_R\), since \(LL^\mathsf{T}=DL_RL_R^\mathsf{T}D=DRD\). The entries of a correlation Cholesky factor must satisfy the constraints that make \(L_RL_R^\mathsf{T}\) a correlation matrix; they are not arbitrary triangular entries.
Worked Example: Combining Standard Deviations and Correlation
Suppose two hypothetical random effects have standard deviations \(0.3\) and \(0.5\), and correlation \(0.6\). A Cholesky factor of their correlation matrix is \(L_R=\begin{pmatrix}1&0\\0.6&0.8\end{pmatrix}\), because \(0.6^2+0.8^2=1\). Construct the covariance factor and covariance matrix.
With \(D=\operatorname{diag}(0.3,0.5)\), the covariance factor is \(L=DL_R=\begin{pmatrix}0.3&0\\0.3&0.4\end{pmatrix}\). Thus:
The covariance is \(0.09\), and the implied correlation is \(0.09/(\sqrt{0.09}\sqrt{0.25})=0.09/(0.3\times0.5)=0.6\), as specified. This representation separates marginal scales from dependence while still producing a valid covariance matrix.
Sampling, Priors, and the Change of Variables
In Bayesian NLME sampling, the factor can be the parameter used to construct \(\Omega\) at every iteration. Positive diagonal elements ensure that every finite factor draw gives a valid positive-definite covariance. This avoids invalid covariance proposals, but it does not guarantee good mixing, adequate exploration, or a well-fitting model.
Care is needed when defining priors. A prior directly specified on \(L\) is not automatically the same prior as one specified on \(\Omega\). For example, if the intended prior density is \(p_\Omega(\Omega)\), but the sampled parameter is \(L\), the density on the factor scale must include the change-of-variables term:
The product shown is the absolute Jacobian determinant for the map from the free entries of a lower-triangular \(L\) to the unique entries of \(\Omega=LL^\mathsf{T}\). If a prior is instead defined directly on the factor entries, that is a different prior specification and this particular conversion is not made. The scale-and-correlation approach likewise requires priors to be interpreted on the parameters on which they were specified. The earlier material on LKJ priors concerns priors for correlations; a Cholesky representation is a computational form, not by itself a choice of prior.
Worked Example: Detecting an Invalid Covariance Proposal
A sampler operating directly on covariance entries proposes the hypothetical matrix \(\Omega_*=\begin{pmatrix}0.04&0.12\\0.12&0.09\end{pmatrix}\). Check whether this is a valid covariance matrix.
The matrix is symmetric, but its determinant is \(0.04(0.09)-0.12^2=0.0036-0.0144=-0.0108\). A symmetric two-by-two matrix is positive definite only if its first diagonal entry and its determinant are both positive. Here the first diagonal entry is positive but the determinant is negative, so \(\Omega_*\) is not positive definite and cannot be used as the covariance matrix of a nondegenerate bivariate normal vector.
A Cholesky parameterization avoids accepting this particular kind of invalid proposal: the sampler proposes factor entries and constructs \(\Omega=LL^\mathsf{T}\). This does not mean the proposal will have a useful posterior density or that the model will fit well; it means the covariance validity constraint is satisfied by construction.
Diagnostics, Alternatives, and Limitations
A valid factor can still reveal numerical or modeling problems. Very small diagonal elements imply a variance close to zero, while very large or highly uneven factor entries can produce poorly scaled covariance matrices. In a sampled chain, inspect the implied standard deviations, correlations, and covariance matrices, not only the raw factor entries. Check for extreme correlations, near-zero variances, implausibly large variation, poor exploration, and sensitivity to reasonable prior or initialization choices. These checks assess the fitted model and computation; positive definiteness alone is not a diagnostic of model adequacy.
The Cholesky approach is one alternative to sampling covariance entries directly. Direct-entry sampling is conceptually transparent, but must enforce symmetry and positive-definiteness constraints and can generate invalid proposals. A scale-and-correlation parameterization makes standard deviations and correlations easier to interpret and can support distinct prior choices for them, but its correlation factor has structural constraints of its own. Either approach can represent the same covariance model when used correctly; the preferred parameterization depends on interpretability, prior specification, and sampling behavior.
The Cholesky factor also depends on the ordering of the random-effect components. Reordering those components changes the entries of \(L\), even though the covariance matrix can be represented in the reordered coordinate system. Its off-diagonal elements therefore should not be interpreted as correlations. Finally, the factorization does not fix weak identification: if the data contain little information about a random-effect variance or correlation, the posterior may remain broad or difficult to explore. The transformation guarantees a valid covariance, not that every covariance is scientifically plausible or well estimated.
Check Your Understanding
Answer each question, then compare your reasoning with the brief solutions.
- For a lower-triangular factor with positive diagonal, what property of \(LL^\mathsf{T}\) is guaranteed, and what condition makes the guarantee hold?
- If \(L=\begin{pmatrix}0.2&0\\0.1&0.3\end{pmatrix}\), calculate the covariance between the two random effects.
- Why can independently proposed covariance entries produce an invalid matrix even when the proposed matrix is symmetric?
- Does using a Cholesky factor guarantee that the posterior sampler will mix well? Explain briefly.
- If the prior is specified on \(\Omega\) but \(L\) is the sampled parameter, what additional consideration is required?
Solutions. (1) \(LL^\mathsf{T}\) is symmetric positive definite when \(L\) is nonsingular; positive diagonal entries in a triangular \(L\) ensure nonsingularity. (2) The covariance is \(0.2(0.1)=0.02\). (3) Symmetry alone does not ensure positive definiteness; for example, a symmetric matrix can have a negative determinant. (4) No. The factor guarantees valid covariance matrices, but not adequate exploration, convergence, or good model fit. (5) Account for the change of variables from \(L\) to \(\Omega\), including the Jacobian when expressing the prior density on the sampled factor scale.