Why Residual-Variance Interaction Matters
In a nonlinear mixed-effects model, an individual random effect can change the predicted response. If the residual error variance is itself a function of that prediction, the random effect also changes the scale of the observation error. The random effect then interacts with the residual error: individuals with different eta values can have different residual variances, even at the same nominal observation time.
This matters when forming a subject-level likelihood approximation. A conditional linearization that updates the predicted mean but holds the residual variance fixed omits part of the way eta affects the data. FOCE interaction retains the dependence of residual variance on eta in the conditional likelihood. It does not mean adding another random effect, nor does it select a residual error model; it refers to how the chosen error model is carried into the approximation.
The usual conditional observation model is \(y_i\mid\eta_i\sim N(f_i(\eta_i),R_i(\eta_i))\). Its conditional log likelihood, excluding the random-effect density, is
where \(m_i\) is the number of observations for subject \(i\). The conditional log posterior used to locate the individual mode adds the random-effect log density:
with \(q\) the dimension of \(\eta_i\). The conditional mode \(\hat\eta_i\) maximizes this joint quantity. The formulas assume a correctly specified conditional normal observation model, a positive-definite \(\Omega\), and a positive-definite \(R_i(\eta_i)\) in the region being evaluated. These conditions ensure the stated densities and inverses exist.
What Changes in the Local Approximation
Write \(\delta_i=\eta_i-\hat\eta_i\), and let \(J_i\) be the Jacobian of \(f_i\) with respect to \(\eta_i\), evaluated at \(\hat\eta_i\). Conditional linearization gives \(f_i(\eta_i)\approx f_i(\hat\eta_i)+J_i\delta_i\). Under a noninteraction treatment, the covariance is held at \(R_i(\hat\eta_i)\). Under FOCE-I, the conditional likelihood instead retains \(R_i(\eta_i)\), or locally represents its variation by a first-order expansion around \(\hat\eta_i\):
Thus the corresponding local subject-level integrand has a linearized mean and an eta-varying covariance:
Here \(\phi\) and \(\phi_{m_i}\) denote the normal densities of the indicated dimensions. The approximation to the mean is local; retaining the original positive covariance function is often safer than extending a linear covariance expansion far from the mode. With covariance frozen at \(R_i(\hat\eta_i)\), the linearized mean and Gaussian random-effect distribution yield a Gaussian convolution. When covariance varies with eta, the integrand is a mixture of normal densities with changing scales and generally does not reduce to that same single Gaussian convolution.
The distinction can also be seen from the conditional score. For one random-effect coordinate \(\eta\), write \(r=y-f(\eta)\), \(R=R(\eta)\), \(f'=\partial f/\partial\eta\), and \(R'=\partial R/\partial\eta\). Differentiating the conditional data log likelihood gives
The first term is the mean contribution. The second and third terms arise because both the quadratic residual penalty and the log determinant change as the covariance changes. The prior adds \(-\eta^T\Omega^{-1}\) in the multivariate score. A noninteraction score omits the covariance-derivative terms; therefore, unless those terms are zero or negligible, it can locate a different conditional mode.
Worked Calculations
Worked Example: Proportional Error Changes the Conditional Likelihood
Suppose a single hypothetical observation is modeled by \(y=10e^\eta+\epsilon\), with \(\epsilon\mid\eta\sim N(0,\{0.1f(\eta)\}^2)\). Compare the conditional data log likelihood at \(\eta=0\) and \(\eta=0.2\) for \(y=12\). This is a calculation of the data likelihood only, not the posterior mode; the prior contribution would also be included when finding that mode.
At \(\eta=0\), \(f=10\), the variance is \(v=(0.1\times10)^2=1\), and the residual is \(r=12-10=2\). Therefore,
At \(\eta=0.2\), \(f=10e^{0.2}=12.214\), \(v=(0.1\times12.214)^2=1.492\), and \(r=12-12.214=-0.2140\). The log variance is \(\log(v)=0.4000\), and \(r^2/v\approx0.0307\). Thus,
The data log likelihood is higher at \(0.2\) than at \(0\), but this comparison alone does not determine the conditional mode: the random-effect penalty must also be included. The example shows why evaluating only the mean change while retaining variance \(1\) would not be the stated proportional-error likelihood.
Worked Example: Covariance Terms in the Score
Use the same model, \(f(\eta)=10e^\eta\) and \(v(\eta)=\{0.1f(\eta)\}^2=e^{2\eta}\), with hypothetical observation \(y=12\). Find the data log-likelihood score at \(\eta=0\), then compare it with the score if variance were frozen.
At zero, \(f=10\), \(f'=10\), \(r=2\), \(v=1\), and \(v'=2\). The scalar form of the score is
Substituting gives \(10\times2/1+\frac{1}{2}(4)(2)-\frac{1}{2}(2)=20+4-1=23\). If variance is frozen, its derivative is set to zero, leaving only \(f'r/v=20\). The difference of 3 log-likelihood units per unit eta is due to the covariance terms. At \(\eta=0\), the prior score is zero for a zero-centered normal random effect, so this data-score comparison also isolates how the likelihood contribution to the mode's slope changes.
Worked Example: Checking a Local Covariance Expansion
Continue with \(f(\eta)=10e^\eta\), \(v(\eta)=e^{2\eta}\), and expand around a hypothetical conditional mode \(\hat\eta=0.1\). Compare the exact and first-order quantities at \(\eta=0.2\), for \(y=12\).
At the expansion point, \(f(\hat\eta)=11.0517\) and \(v(\hat\eta)=e^{0.2}=1.2214\). The derivatives are \(f'(\hat\eta)=11.0517\) and \(v'(\hat\eta)=2e^{0.2}=2.4428\). Since \(\eta-\hat\eta=0.1\), the first-order values are \(f_{\mathrm{lin}}=11.0517+11.0517(0.1)=12.1569\) and \(v_{\mathrm{lin}}=1.2214+2.4428(0.1)=1.4657\).
The exact values at \(0.2\) are \(f=12.2140\) and \(v=e^{0.4}=1.4918\). The local expansion is close here, but not identical. Using the linearized quantities gives residual \(12-12.1569=-0.1569\) and conditional log likelihood
Using the exact quantities gives approximately \(-1.134\), as in the preceding calculation. This small difference is plausible for a short step from the expansion point; it is not evidence that the first-order expansion is accurate over a wide eta range.
Assumptions, Diagnostics, and Alternatives
The interaction correction is relevant when the selected residual variance model actually depends on eta. For example, under proportional error with standard deviation \(\sigma_{\mathrm{prop}}f_j(\eta)\), observation \(j\) has variance \(\sigma_{\mathrm{prop}}^2f_j(\eta)^2\). With combined additive and proportional error, \(v_j(\eta)=\sigma_{\mathrm{add}}^2+\sigma_{\mathrm{prop}}^2f_j(\eta)^2\). In the latter case, \(v_j'(\eta)=2\sigma_{\mathrm{prop}}^2 f_j(\eta)f_j'(\eta)\). By contrast, a purely additive error model with constant variance has \(R_i'(\eta)=0\), so this particular interaction term is absent.
A practical check is to evaluate whether the variance changes meaningfully over the eta range that contributes to the subject likelihood, not only at \(\eta=0\). Inspect the fitted variance function and conditional predictions, verify that covariance matrices remain positive definite, and check numerical stability of the individual modes and objective as tolerances or starting values change. Large differences between interaction and noninteraction fits can indicate that the variance dependence matters, but can also signal weak information, an unsuitable residual model, or poor local approximation. The difference alone does not establish which fit is adequate.
A first-order approximation in eta may be poor if the prediction or variance is strongly curved near the mode, if the mode is far from the population mean, or if the data are sparse enough that the individual likelihood is broad. A linearized covariance can also become nonpositive definite away from the expansion point, even when the original variance model is valid. In such cases, retain and evaluate a valid covariance function where possible, assess sensitivity to the approximation, and consider other marginal-likelihood approximations. Those approaches have their own assumptions and numerical costs; FOCE-I is not a guarantee of an exact marginal likelihood.
| Approach | Mean treatment | Residual covariance treatment | Main implication |
|---|---|---|---|
| FOCE without interaction | Locally linearized near the conditional mode | Held fixed at a reference eta value | Simpler local calculation; omits covariance-derivative effects |
| FOCE-I | Locally linearized near the conditional mode | Retains eta-dependence in the conditional likelihood | Accounts for changes in residual scale with eta; may require more demanding calculations |
| First-order approximation around the population mean | Linearized at the population reference | Depends on the specified implementation | Does not condition the linearization on the subject-specific mode |
The comparison is about the approximation, not which residual model is intrinsically preferable. The introductory material on marginal likelihood as an integral explains why the subject contribution integrates over eta; FOCE-I changes the local integrand used to represent that contribution. It does not remove the need to specify and assess the observation model.
Common Pitfall
A common mistake is to say, “Proportional error is handled because the prediction was linearized, so the residual variance is automatically handled too.” That is incorrect: linearizing \(f_i(\eta_i)\) updates the conditional mean, but does not itself retain \(R_i(\eta_i)\). The correction is to write the conditional likelihood with its log-determinant and residual quadratic term, then check whether both depend on eta. If they do, their derivatives contribute to the conditional score and their variation belongs in the interaction approximation.
Check Your Understanding
Answer each question, then compare with the solutions below.
- In a purely additive error model with constant residual variance, which covariance-derivative terms in the conditional score remain?
- For \(v(\eta)=\sigma_{\mathrm{prop}}^2 f(\eta)^2\), write \(v'(\eta)\).
- Why can’t an eta-varying residual covariance generally be folded into the same single Gaussian convolution obtained when covariance is fixed?
- In the score formula, what two covariance-related contributions arise in addition to the mean term?
Solutions. (1) If the covariance is constant, \(R'(\eta)=0\), so both covariance-derivative terms are zero. (2) Differentiation gives \(v'(\eta)=2\sigma_{\mathrm{prop}}^2 f(\eta)f'(\eta)\). (3) The normal density’s scale, including its determinant and residual quadratic, changes with eta; integrating therefore forms a mixture of changing normal scales, not generally one normal density. (4) The terms are \(\frac{1}{2}r^TR^{-1}R'R^{-1}r\), from the changing residual quadratic, and \(-\frac{1}{2}\operatorname{tr}(R^{-1}R')\), from the changing log determinant.