Tutorials › Econometrics (Graduate) › Sandwich Covariance Under Likelihood Misspecification

Nonlinear Likelihood Estimation · Tutorial 446 of 952

Sandwich Covariance Under Likelihood Misspecification

Learn why misspecified maximum likelihood needs a sandwich covariance and how to estimate its score-variance and curvature components.

Intermediate 10 min read

What You'll Learn

  • Define the pseudo-true parameter targeted by a misspecified likelihood.
  • Distinguish expected negative curvature from the variance of individual scores.
  • Derive the asymptotic sandwich covariance using a score expansion and the central limit theorem.
  • Estimate the sandwich covariance from fitted individual scores and Hessians.
  • Interpret when robust covariance differs from the inverse-information covariance.
  • Identify what sandwich standard errors do and do not correct.

Why Likelihood Curvature May Not Measure Uncertainty

Maximum likelihood calculations often report uncertainty from the inverse curvature of the log-likelihood. That calculation has a special justification when the likelihood is correctly specified: the variability of the score and the curvature of the likelihood agree in expectation. If the likelihood is instead a working model, that agreement need not hold. The estimator can still target a meaningful parameter and be consistent for it, but its uncertainty depends on two distinct quantities: how variable the scores are across observations, and how sharply the expected log-likelihood curves around its optimum.

The sandwich covariance combines these quantities. It is not a different estimator of the parameter; it is a covariance estimator for the maximum-likelihood estimator under regular likelihood misspecification. Its central practical lesson is that inverse curvature alone can understate or overstate uncertainty when the working likelihood does not describe the full data distribution.

The Target and the Two Components

Suppose \(Y_1,\ldots,Y_n\) are independent and identically distributed observations from a true distribution \(P_0\). A working likelihood assigns observation \(i\) a log-likelihood contribution \(\ell_i(\theta)\), where \(\theta\) is a \(k\)-dimensional parameter. The contributions need not be the true log-density of the observations. Write the individual score as \(s_i(\theta)=\partial\ell_i(\theta)/\partial\theta\), a \(k\)-vector, and the individual Hessian as \(H_i(\theta)=\partial^2\ell_i(\theta)/\partial\theta\partial\theta'\), a \(k\) by \(k\) matrix.

Definition: The pseudo-true parameter \(\theta^*\) is the value that maximizes the expected working log-likelihood \(E_0[\ell_i(\theta)]\) over the parameter space. For an interior optimum under differentiability, it satisfies \(E_0[s_i(\theta^*)]=0\). Define the expected negative curvature \(A=-E_0[H_i(\theta^*)]\) and the score-variance matrix \(B=E_0[s_i(\theta^*)s_i(\theta^*)']\). When the score has mean zero, \(B\) is its covariance matrix.

The pseudo-true parameter is the best-fitting value according to the chosen expected log-likelihood criterion, not necessarily a parameter of the true distribution. The matrix \(A\) measures how strongly expected likelihood changes near that value. The matrix \(B\) measures how much individual scores fluctuate around zero under the true distribution. Under misspecification, there is generally no reason for \(A\) and \(B\) to be equal.

The result below assumes an interior, uniquely identified pseudo-true parameter; differentiability and suitable moment conditions; a nonsingular positive-definite \(A\); and an independent, identically distributed sample for which the score satisfies a central limit theorem and the sample Hessian converges to its expectation. These conditions support both a local score expansion and stable estimation of the two matrices. If the observations are dependent, the score covariance generally needs a dependence-appropriate form rather than the independent-observation formula given here.

Theorem: Under these regularity conditions, a maximum-likelihood estimator \(\hat{\theta}\) that converges to \(\theta^*\) satisfies
$$ \sqrt{n}(\hat{\theta}-\theta^*)\ \xrightarrow{d}\ N\!\left(0,\ A^{-1}BA^{-1}\right). $$
Thus the asymptotic covariance of \(\hat{\theta}\) is \(A^{-1}BA^{-1}/n\). In a scalar problem this is \(B/(nA^2)\).

Why the Sandwich Formula Appears

The maximum-likelihood score equation sets the sum of individual scores to zero. Expand that equation around \(\theta^*\). The average Hessian describes how much the average score changes when the parameter moves; its limit is \(-A\). The fluctuation of the average score at \(\theta^*\), by contrast, is governed by \(B\). Combining the two gives the sandwich.

1
Expand the score equation.
At an interior maximum, \(n^{-1}\sum_i s_i(\hat{\theta})=0\). A Taylor expansion around \(\theta^*\) gives \(0=n^{-1}\sum_i s_i(\theta^*)+\left[n^{-1}\sum_i H_i(\tilde{\theta})\right](\hat{\theta}-\theta^*)\), where \(\tilde{\theta}\) lies between the two parameter values in the expansion.
2
Use the limiting curvature.
As \(\hat{\theta}\) converges to \(\theta^*\), the average Hessian converges to \(E_0[H_i(\theta^*)]=-A\). Rearranging the expansion therefore yields \(\sqrt{n}(\hat{\theta}-\theta^*)=A^{-1}n^{-1/2}\sum_i s_i(\theta^*)+o_p(1)\).
3
Apply the score central limit theorem.
The individual scores have mean zero and covariance \(B\), so \(n^{-1/2}\sum_i s_i(\theta^*)\) converges in distribution to a mean-zero normal vector with covariance \(B\). Multiplication on the left by \(A^{-1}\) gives covariance \(A^{-1}BA^{-1}\), as stated.

This derivation separates the roles of the two matrices: curvature converts a score fluctuation into a parameter fluctuation, while score variability determines the size of the original fluctuation. It also explains why the matrix \(A^{-1}\) appears on both sides of \(B\). For a scalar parameter the two factors multiply to \(A^{-2}\), not \(A^{-1}\).

Estimating the Sandwich from a Fitted Model

Evaluate each contribution at the fitted estimate. A common empirical estimate of expected negative curvature is the observed negative Hessian averaged over observations. Estimate score variability with the average outer product of individual scores. The resulting covariance estimator includes a factor of \(1/n\), because \(A\) and \(B\) describe the covariance of the scaled estimator \(\sqrt n(\hat{\theta}-\theta^*)\), rather than the estimator itself.

$$ \widehat{A}=-\frac{1}{n}\sum_{i=1}^n H_i(\hat{\theta}), \qquad \widehat{B}=\frac{1}{n}\sum_{i=1}^n s_i(\hat{\theta})s_i(\hat{\theta})', \qquad \widehat{\operatorname{Var}}(\hat{\theta}) =\frac{1}{n}\widehat{A}^{-1}\widehat{B}\widehat{A}^{-1}. $$

At an unconstrained maximum, the sum of the fitted scores is zero, up to numerical tolerance. Thus their average is zero, and the displayed outer-product estimate is also their sample covariance when centered by their average. In other settings, explicitly centering the scores can be useful; the appropriate estimator depends on the estimating problem and its constraints. A second common presentation uses sums rather than averages: if \(\widehat{J}=-\sum_i H_i(\hat{\theta})\) and \(\widehat{S}=\sum_i s_i(\hat{\theta})s_i(\hat{\theta})'\), the same covariance is \(\widehat{J}^{-1}\widehat{S}\widehat{J}^{-1}\). The scaling must be consistent across the two presentations.

Worked Example: A Scalar Normal Working Likelihood

Suppose four hypothetical observations are \(1,2,4,5\), and fit a normal working likelihood for their mean with working variance fixed at \(4\). The true distribution is not assumed to be normal. For this illustration, assume the observations are independent draws with a finite variance. The pseudo-true mean is the population mean, and the fitted mean is \(\hat{\theta}=\bar{x}=3\).

For an observation \(x_i\), the score for the mean is \(s_i(\theta)=(x_i-\theta)/4\), and the Hessian is \(H_i(\theta)=-1/4\). At the fitted value, the four scores are \(-0.5,-0.25,0.25,0.5\). Their average is zero, as required by the fitted score equation.

The average observed negative Hessian and the average squared score are

$$ \widehat{A}=\frac{1}{4}\sum_{i=1}^4\frac{1}{4}=0.25, \qquad \widehat{B}=\frac{0.5^2+0.25^2+0.25^2+0.5^2}{4} =\frac{0.625}{4}=0.15625. $$

Therefore the estimated sandwich variance of the fitted mean is

$$ \frac{1}{4}(0.25)^{-1}(0.15625)(0.25)^{-1} =\frac{1}{4}(4)(0.15625)(4)=0.625. $$

The sandwich standard error is \(\sqrt{0.625}=0.7906\) in the units of the observations. By comparison, the inverse-curvature variance is \(1/(n\widehat{A})=1/(4\cdot0.25)=1\), giving a standard error of \(1\). The difference reflects the empirical score variability in this hypothetical sample; it does not establish that either estimate will always be smaller.

Worked Example: Exponential Likelihood Used as a Working Model

Consider six hypothetical positive observations \(1,1,2,4,4,6\). Fit an exponential likelihood parameterized by its mean \(\theta>0\), even though the data-generating distribution need not be exponential. Assume the observations are independent with finite variance and a positive mean. The working log-likelihood contribution, omitting no parameter-dependent terms, is \(\ell_i(\theta)=-\log(\theta)-y_i/\theta\). Its score is \((y_i-\theta)/\theta^2\).

The average working log-likelihood is maximized at the sample mean, so \(\hat{\theta}=3\). This is also the pseudo-true value when the true mean is \(3\). The individual scores at the fit are \(-2/9,-2/9,-1/9,1/9,1/9,3/9\); they sum to zero.

Differentiate the score to get \(H_i(\theta)=1/\theta^2-2y_i/\theta^3\). At \(\hat{\theta}=3\), the average negative Hessian is

$$ \widehat{A} =-\frac{1}{6}\sum_i\left(\frac{1}{9}-\frac{2y_i}{27}\right) =-\left(\frac{1}{9}-\frac{2(3)}{27}\right) =\frac{1}{9}. $$

The score outer-product estimate is

$$ \widehat{B} =\frac{(-2)^2+(-2)^2+(-1)^2+1^2+1^2+3^2}{6\cdot 9^2} =\frac{20}{486}=\frac{10}{243}. $$

Substitution into the sandwich gives

$$ \widehat{\operatorname{Var}}(\hat{\theta}) =\frac{1}{6}\left(\frac{1}{9}\right)^{-1} \left(\frac{10}{243}\right) \left(\frac{1}{9}\right)^{-1} =\frac{1}{6}(9)\left(\frac{10}{243}\right)(9) =\frac{5}{9}=0.5556. $$

This result is consistent with the direct score calculation: the observed squared deviations from the mean sum to \(20\), so the average squared deviation is \(20/6\); dividing by \(n=6\) gives \(20/36=5/9\). In this example, the sandwich accounts for the empirical spread of observations rather than imposing the variance relationship implied by an exponential distribution.

Worked Example: Combining Curvature and Score Variability in Two Dimensions

Suppose a hypothetical fitted likelihood has four observations and two parameters. At the fitted value, their score vectors are \((1,0)'\), \((-1,0)'\), \((0,2)'\), and \((0,-2)'\). Suppose the average negative Hessian contributions at this fit give \(\widehat{A}=\begin{pmatrix}2&0.5\\0.5&1\end{pmatrix}\). These numerical summaries specify the fitted score and curvature information needed for the sandwich calculation; the scores sum to zero.

The score outer products average to

$$ \widehat{B} =\frac{1}{4} \begin{pmatrix} 2&0\\ 0&8 \end{pmatrix} = \begin{pmatrix} 0.5&0\\ 0&2 \end{pmatrix}. $$

The determinant of \(\widehat{A}\) is \(2(1)-(0.5)^2=1.75\), so \(\widehat{A}^{-1}=\begin{pmatrix}4/7&-2/7\\-2/7&8/7\end{pmatrix}\). Multiplying on both sides of \(\widehat{B}\) gives

$$ \widehat{A}^{-1}\widehat{B}\widehat{A}^{-1} = \begin{pmatrix} 16/49&-36/49\\ -36/49&130/49 \end{pmatrix}. $$

Because \(n=4\), the estimated covariance of the two fitted parameters is \(\begin{pmatrix}4/49&-9/49\\-9/49&65/98\end{pmatrix}\), approximately \(\begin{pmatrix}0.08163&-0.1837\\-0.1837&0.6633\end{pmatrix}\). The off-diagonal entries indicate estimated covariance between the two parameter estimates. Each diagonal entry is an estimated variance, in the squared units of its corresponding parameter.

Correct Specification, Interpretation, and Pitfalls

When the likelihood is correctly specified and the usual regularity conditions hold, the information equality gives \(A=B\). The sandwich then simplifies to \(A^{-1}/n\), the familiar inverse-information covariance. Under misspecification, estimating only curvature still measures how quickly the working likelihood changes, but it does not capture the true variability of the scores. The sandwich retains both pieces.

A sandwich covariance supports standard errors, confidence intervals, and tests for the fitted parameters when the estimator is regular and targets the pseudo-true value. It does not make a misspecified likelihood correct, ensure that the pseudo-true parameter answers the scientific question of interest, remove bias from a poor target, or repair a failure of identification. Nor does the independent-observation formula automatically account for dependence or clustering. Those are separate issues requiring suitable assumptions and methods.

  • Mistake: using curvature as the whole answer. The reasoning “the Hessian is steep, so the estimate must be precise” ignores the variability of the individual scores. Under misspecification, use both \(A\) and \(B\).
  • Mistake: confusing the two matrix estimates. The negative Hessian estimates expected curvature; the outer products of individual scores estimate score variability. They are not interchangeable under misspecification.
  • Mistake: omitting the sample-size scaling. The sandwich for \(\sqrt n(\hat{\theta}-\theta^*)\) is \(A^{-1}BA^{-1}\). The covariance for \(\hat{\theta}\) includes division by \(n\).
  • Mistake: treating robust standard errors as a cure for model failure. They adjust uncertainty around the estimator's target; they do not turn the pseudo-true target into a true structural parameter or correct every form of misspecification.
Key takeaway: Under regular likelihood misspecification, the asymptotic covariance is \(A^{-1}BA^{-1}/n\): curvature on the outside, score variability in the middle, and the sample-size factor \(1/n\). Estimate the two components separately from fitted Hessians and individual scores.

Check Your Understanding

Use the definitions and results above to answer these questions.

  1. In words, what does the pseudo-true parameter maximize, and why need it not be a parameter of the true distribution?
  2. What feature of a correctly specified likelihood allows the sandwich covariance to simplify to inverse information?
  3. For a scalar parameter with \(A=2\), \(B=8\), and \(n=100\), calculate the asymptotic variance of the estimator.
  4. Why does the empirical sandwich use both the average negative Hessian and the average outer product of individual scores?
  5. Name one problem that sandwich standard errors do not, by themselves, correct.
Clinical Biostats