Documentation

20.27 Worked example: switching the oral model to Laplace

The Laplace example deliberately holds the control stream and dataset constant while changing the approximation. That isolation is essential: if data filters, initial estimates, random-effects structure or residual-error logic also change, the reason for any numerical difference becomes ambiguous.

nlmx fit documents/ch20/input/run20.ctl `
  --output documents/ch20/results/oral_laplace `
  --overwrite --approximation laplace --no-cov-step `
  --carry-columns WT,GROUP --plots --plot-format both

The verified run used the same 24 subjects and 192 fitted observations, with the same 24 predose records omitted. Laplace minimization completed in 19 iterations and 285 objective evaluations. The final maximum gradient was 4.038e-4; the reportable OFV was −420.3705. CL was 3.78525 L/h, V 42.6439 L and KA 1.14166 1/h. These are close to, but not identical with, the FOCE-I results because the likelihood approximations differ.

This run requested --no-cov-step, so dashes in SE, RSE and confidence-interval columns are expected. They do not mean zero uncertainty. For a decision-quality result, rerun the selected method with covariance enabled and verify the covariance method and conditioning. A fast method-comparison run can omit covariance, but that choice must remain explicit in the audit record.

Observed values versus individual predictions for the shared oral example

Use this comparison to ask whether method changes alter individual predictions materially. Do not decide between approximations by OFV magnitude alone when the objective definitions are not strictly comparable. Consider model nonlinearity, sparse sampling, discrete likelihoods, ETA behavior, diagnostic patterns, computation time and agreement with the reference implementation.

A controlled comparison table

Quantity FOCE-I Laplace
Iterations 17 19
Evaluations 255 285
OFV −423.6680 −420.3705
CL (L/h) 3.83797 3.78525
V (L) 42.6185 42.6439
KA (1/h) 1.13156 1.14166

The table is descriptive evidence, not proof that either approximation is universally superior.

Common mistakes

  • Calling missing SEs a covariance failure when covariance was disabled.
  • Comparing methods after changing several other inputs.
  • Selecting the smallest printed OFV across incompatible objectives.
  • Assuming close fixed effects guarantee close individual predictions.

Checklist

  • Freeze data, control logic and initials.
  • Record the requested and resolved approximation.
  • Compare termination, gradients, parameters and predictions.
  • Enable covariance for the final chosen run.
  • Document why the method is appropriate for the likelihood.

Further reading

Review methods and controls, the SAEM example, and validation limits.