18.37 Worked example: nonlinear approximations
The nonlinear toy model uses \(f_j=\exp(\theta+\eta)x_j\), \(x=(0.5,1,2)\), \(\theta=\log2\), OMEGA variance 0.36, observations (1.10,2.35,4.25), and combined variance (0.04f_j^2+0.04).
Numerical Simpson integration over ETA in ([-4,4]) with 40,000 panels gives the reference constant-omitted OFV −0.837008. FOCE holds variance at ETA zero and finds mode 0.101192. FOCE-I/Laplace use ETA-dependent variance and find mode 0.066141.
The approximation table records FO, FOCE, FOCE-I and Laplace differences from numerical integration.
The point is mechanical: interaction changes the conditional objective, and local approximations need not equal integration. The ranking in this one toy case is not a general accuracy ranking.
Step-by-step check
At ETA zero, predictions are (1,2,4) and combined variances are (0.08,0.20,0.68). Evaluate the conditional objective there, then at each reported mode. FOCE keeps those zero-ETA variances during its search; FOCE-I recomputes them. Finally expand numerical integration to ([-5,5]) or double the panel count and verify stable digits. These checks separate quadrature truncation from approximation difference.
The generated SVG bars plot approximation minus exact quadrature, not absolute goodness. Their order can change with observations, variability and error model.
Re-run the script after changing OMEGA to a much smaller variance. The approximations should generally move closer because plausible ETAs occupy a more local region, although the exact pattern depends on data and error. Treat this as an exploration, not a guarantee.
Common mistakes
Do not generalize from one ETA/example, treat finite quadrature as absolute truth without checking range/resolution, or compare rounded values.
Checklist
- Reproduce prediction and variance equations.
- Confirm both conditional modes.
- Expand quadrature range/panels.
- Compare full-precision csvCSV.
- Keep the example’s limits explicit.
Further reading
See method comparison and Chapter 42 for a real validation matrix.