Documentation

18.9 Linearisation and the G matrix

Linearisation replaces a nonlinear prediction near \(\eta^\star\) with its tangent:

\[ Y_i(\eta)\approx Y_i(\eta^\star)+G_i(\eta-\eta^\star), \]

where \(G_i=\partial Y_i/\partial\eta\) contains one row per observation and one column per ETA. After this replacement, integrating normally distributed ETAs gives an approximate Gaussian subject distribution.

Linearisation replaces a curved response locally

Its mean is \(Y_i(\eta^\star)-G_i\eta^\star\), and covariance is \(C_i=G_i\Omega G_i^{\mathsf T}+R_i\). The subject objective becomes

log|C_i| + r_i' C_i^-1 r_i,
r_i = y_i − Y_i(eta*) + G_i eta*.

FO chooses ETA zero. FOCE/FOCE-I choose the conditional mode. If the model is linear in ETA and residual variance is constant, the tangent is exact everywhere. That is why all classical methods coincide in the frozen linear example.

nlmx evaluates determinant and inverse terms with the determinant lemma and Woodbury identity, reducing expensive observation-sized operations to ETA-sized matrices. This matters when subjects have many observations but relatively few ETAs.

Linearisation error grows with curvature and distance from the expansion point. Large variability, sparse data, steep nonlinear response and ETA-dependent variance can expose it.

Practical interpretation

For one prediction, evaluate the model at ETA −0.2, 0 and 0.2. Estimate the central slope and use it to predict the two outer values from the tangent. The difference from the actual model is local linearization error. Repeat around the conditional mode. This exercise shows why FOCE can improve on FO and why neither tangent is an exact global representation.

Common mistakes

Do not confuse \(G\) with a population gradient over THETA, or assume a locally accurate tangent is globally accurate. A numerically precise derivative cannot repair a poor approximation point.

Checklist

  • State the expansion point.
  • Verify derivative scale and ETA ordering.
  • Identify ETA-dependent residual variance.
  • Examine curvature and variability magnitude.
  • Use exact linear cases as implementation tests.

Further reading

Continue through FO, FOCE, FOCE-I, and Laplace.