Why Optimize the Observed-Data Likelihood Directly?
With incomplete multivariate data, each case contributes information about the coordinates that were observed, not a complete vector that can simply be analyzed as if nothing were missing. The Gaussian observed-data likelihood accounts for this by using the appropriate marginal normal distribution for each case’s observed coordinates. Directly optimizing that likelihood is an alternative to the EM algorithm: it can use general-purpose numerical optimizers and can be convenient when the model has additional constraints or parameters.
The numerical task is not just to find a parameter vector that makes an optimizer stop. Covariance matrices must remain positive definite, and the likelihood can be poorly behaved near the boundary of that parameter space. A small step in an unconstrained covariance entry can produce an invalid matrix; a nearly singular matrix can produce a very large likelihood or unreliable calculations. The objective, parameterization, and convergence checks therefore all matter.
Writing the Objective Correctly
For each case, let \(S_i\) be the coordinate-selection matrix that extracts the entries in \(O_i\). Write \(d_i=|O_i|\), \(\mu_i=S_i\mu\), and \(\Sigma_i=S_i\Sigma S_i^{T}\). The observed subvector has distribution \(N_{d_i}(\mu_i,\Sigma_i)\). Thus, up to the ignorable missingness mechanism, the log-likelihood is
The determinant and quadratic form are pattern-specific. In particular, a case with only one observed coordinate contributes the univariate marginal density for that coordinate; it does not contribute a complete-vector density with an invented value for the missing coordinate. Different cases can therefore involve different submatrices of \(\Sigma\). This is one reason a simple complete-data covariance formula generally does not maximize this objective.
Worked Example: Summing Contributions From Three Patterns
Suppose \(p=2\), \(\mu=(1,2)^T\), and \(\Sigma=\operatorname{diag}(4,9)\). There are three cases: \(Y_1=(3,5)^T\) is fully observed, case 2 observes only coordinate 1 with value \(-1\), and case 3 observes only coordinate 2 with value \(5\). Calculate the log-likelihood at these parameter values.
For case 1, the residual is \((2,3)^T\), the determinant is \(4\cdot9=36\), and the quadratic form is \(2^2/4+3^2/9=1+1=2\). Its contribution is \(-\log(2\pi)-\tfrac12\log36-1=-\log(2\pi)-\log6-1\).
For case 2, the observed marginal has mean 1 and variance 4. Its residual is \(-2\), so the quadratic form is \(4/4=1\). The contribution is \(-\tfrac12\log(2\pi)-\tfrac12\log4-\tfrac12=-\tfrac12\log(2\pi)-\log2-\tfrac12\).
For case 3, the observed marginal has mean 2 and variance 9. Its residual is 3, so its quadratic form is \(9/9=1\). The contribution is \(-\tfrac12\log(2\pi)-\tfrac12\log9-\tfrac12=-\tfrac12\log(2\pi)-\log3-\tfrac12\).
Adding the three terms gives \(\ell=-2\log(2\pi)-\log6-\log2-\log3-2=-2\log(2\pi)-\log36-2\). The univariate contributions use variances 4 and 9, respectively; neither uses the determinant or quadratic form for the full bivariate vector.
Scores and Covariance-Safe Optimization
An optimizer may use analytic derivatives, numerical derivatives, or both. The following score expressions also provide a useful check on a numerical implementation. For each nonempty pattern, set \(r_i=Y_{i,O_i}-S_i\mu\) and \(A_i=(S_i\Sigma S_i^T)^{-1}\). Differentiating the log-likelihood gives
The second expression is the symmetric-matrix gradient under the trace inner product: its inner product with a symmetric perturbation \(H\) is the first-order change in log-likelihood in direction \(H\).
To verify the result, consider one nonempty pattern with \(C_i=S_i\Sigma S_i^T\), \(r_i=Y_{i,O_i}-S_i\mu\), and \(A_i=C_i^{-1}\). For a symmetric perturbation \(dC_i\), the determinant and inverse differentials are \(d\log|C_i|=\operatorname{tr}(A_i\,dC_i)\) and \(dA_i=-A_i(dC_i)A_i\). Consequently,
Rewriting the scalar quadratic differential as a trace shows that the gradient with respect to \(C_i\) is \(\tfrac12(A_i r_i r_i^T A_i-A_i)\). Since \(dC_i=S_i(d\Sigma)S_i^T\), the corresponding gradient with respect to \(\Sigma\) is \(S_i^T\{\tfrac12(A_i r_i r_i^T A_i-A_i)\}S_i\). For a mean perturbation \(d\mu\), \(dr_i=-S_i d\mu\), and the quadratic term has differential \(r_i^TA_iS_i d\mu\). Its gradient is \(S_i^TA_ir_i\). Summing these contributions over cases proves both formulas. \(\square\)
Optimizing the raw entries of \(\Sigma\) is hazardous: an unconstrained step can leave the positive-definite cone, making log-determinants and inverses undefined. A standard remedy is a Cholesky parameterization \(\Sigma=LL^T\), where \(L\) is lower triangular and its diagonal entries are strictly positive. For example, set \(L_{jj}=\exp(\eta_j)\), with unconstrained real parameters \(\eta_j\); the entries below the diagonal can also be optimized as unconstrained real numbers. Every finite parameter vector then gives a positive-definite covariance matrix.
Worked Example: Evaluating the Objective at a Cholesky Parameter
Use the three cases from the first example, but evaluate the likelihood at \(\mu=(1,2)^T\) and \(\Sigma=\begin{pmatrix}4&1\\1&2\end{pmatrix}\). This matrix is positive definite because its leading diagonal entry is 4 and its determinant is \(8-1=7>0\). One Cholesky factor is \(L=\begin{pmatrix}2&0\\1/2&\sqrt{7}/2\end{pmatrix}\), and direct multiplication gives \(LL^T=\Sigma\).
For case 1, \(r=(2,3)^T\). The inverse is \(\Sigma^{-1}=\tfrac17\begin{pmatrix}2&-1\\-1&4\end{pmatrix}\), so \(r^T\Sigma^{-1}r=(8-12+36)/7=32/7\). Its log-likelihood contribution is \(-\log(2\pi)-\tfrac12\log7-16/7\).
For case 2, only coordinate 1 is observed. Its marginal variance is 4 and its residual is \(-2\), so the contribution is \(-\tfrac12\log(2\pi)-\log2-\tfrac12\). For case 3, only coordinate 2 is observed. Its marginal variance is 2 and its residual is 3, so the contribution is \(-\tfrac12\log(2\pi)-\tfrac12\log2-\tfrac94\).
The total is therefore \(-2\log(2\pi)-\tfrac12\log7-\tfrac32\log2-\tfrac{141}{28}\), since \(16/7+1/2+9/4=64/28+14/28+63/28=141/28\). This is an objective evaluation, not a claim that these parameters maximize the likelihood. In optimization, the same calculation is repeated at proposed parameter values generated through \(L\), rather than by accepting arbitrary covariance entries.
Numerical Failure Modes and Diagnostics
A positive-definite parameterization prevents invalid covariance matrices, but it does not guarantee a well-behaved optimization problem. In particular, the likelihood can increase without bound as a covariance eigenvalue approaches zero when the data lie in a lower-dimensional configuration.
Worked Example: A Likelihood That Diverges Near Singularity
Consider two complete bivariate observations \(y_1=(-\sqrt{2},0)^T\) and \(y_2=(\sqrt{2},0)^T\). Evaluate the likelihood along the valid parameter sequence with fixed \(\mu=(0,0)^T\) and \(\Sigma_\varepsilon=\operatorname{diag}(1,\varepsilon)\), where \(\varepsilon>0\).
For either observation, \(|\Sigma_\varepsilon|=\varepsilon\), and the quadratic form is \((\sqrt{2})^2/1+0^2/\varepsilon=2\). Thus each log-density is \(-\log(2\pi)-\tfrac12\log(\varepsilon)-1\). Summing both contributions gives
The coefficient of \(\log(\varepsilon)\) comes from adding the two terms \(-\tfrac12\log(\varepsilon)\), one per complete bivariate observation. Although every \(\Sigma_\varepsilon\) is positive definite, the sequence approaches a singular boundary and the likelihood has no finite maximum over the unrestricted model for these data. An optimizer reporting a very small eigenvalue and a rapidly increasing likelihood is therefore not necessarily finding a stable interior estimate.
Poor initialization can also send an algorithm into a narrow, badly conditioned region. A covariance start with a very small eigenvalue makes inverses large and objective changes sensitive to tiny parameter movements. In a Cholesky parameterization, extremely negative diagonal log-parameters create the same practical difficulty even though the matrix remains positive definite. Multiple dispersed starts can reveal whether the optimizer is finding the same interior solution or repeatedly approaching different boundaries.
For every case, use only its observed coordinates and the corresponding covariance submatrix. Check a few contributions by hand.
Optimize the mean and a Cholesky factor, not unconstrained covariance entries. Compute log-determinants and solves with stable matrix factorizations rather than explicitly forming inverses where possible.
Check the optimizer’s termination status, the gradient norm, changes in parameters and log-likelihood, and whether the covariance eigenvalues stay comfortably away from zero.
Re-evaluate the likelihood independently at the returned estimate. Compare multiple starts and investigate extreme condition numbers or estimates that change substantially under small perturbations.
A small change in log-likelihood alone does not establish convergence to a useful maximum: a flat region, an ill-conditioned boundary, or a failed line search can also produce small changes. Likewise, a positive-definite estimate is not automatically well-conditioned. If a lower bound on eigenvalues, a penalty, or a covariance constraint is introduced to stabilize fitting, it changes the optimization problem and should be reported as part of the model or estimation procedure—not presented as though it were merely a computational detail.
Common Mistake
A common error is to treat an optimizer’s “converged” message as proof that a finite, reliable maximum-likelihood estimate has been found. That conclusion does not follow: an algorithm can stop near a singular boundary, at a point with a substantial gradient, or at a local solution whose quality depends on initialization. The correction is to examine the fitted covariance spectrum and condition number, check gradients and likelihood values, compare well-separated starts, and determine whether the likelihood appears to keep increasing as an eigenvalue shrinks. If it does, report the boundary or nonexistence issue rather than interpreting the returned finite iterate as an ordinary interior MLE.
Check Your Understanding
Use the likelihood and diagnostics developed above to answer these questions.
- Why does a case with only one observed coordinate contribute a univariate marginal density rather than a complete-vector density?
- What does a Cholesky parameterization guarantee about \(\Sigma\), and what numerical problem does it not rule out?
- In the two-observation example, identify the term that makes the log-likelihood diverge as \(\varepsilon\) approaches zero.
- Name at least three checks, beyond an optimizer’s termination message, that help assess a fitted solution.
- Why must an eigenvalue bound or penalty be described as part of the estimation procedure rather than as a neutral computational fix?