Documentation

18.19 Parameter transforms and bounds

The optimizer works on unconstrained internal coordinates. A doubly bounded THETA uses a logit of its fractional position; a lower-bounded THETA uses log distance above the bound; an upper-bounded THETA uses log distance below it; an unbounded THETA uses identity.

Transforms turn constrained parameters into free coordinates

Transforms prevent illegal proposals and improve scale behavior, but a parameter can approach a bound asymptotically. Gradients reported on the internal scale therefore differ from natural-scale slopes. Near-boundary estimates make symmetric standard errors and Wald intervals unreliable.

Bounds should represent scientific/numerical admissibility, not desired results. An unnecessarily tight upper bound can create a false optimum; an enormous range can worsen scaling. nlmx flags a THETA within 1% of its initial distance to a bound.

Practical interpretation

Translate a few equal internal steps back to the natural scale at the middle and near each bound. The asymmetry becomes obvious: the same optimizer movement can produce a large natural change centrally and a tiny change near an edge. This is why natural-scale tables, transformed gradients and boundary flags must be read together rather than in isolation.

For cross-software work, translate starts and bounds through the same transformation instead of assuming identical printed values imply identical internal geometry. Report conclusions on the scientifically meaningful natural scale.

Preserve the internal-scale trace when diagnosing optimizer behavior, because it is the coordinate system in which gradients and step limits are defined.

Common mistakes

Do not widen a physical bound only to improve covariance, or compare internal gradients across different parameterizations. A value printed slightly inside a bound can still be effectively constrained.

Checklist

  • Document every bound and scientific rationale.
  • Inspect distance to bound relative to initialization.
  • Transform covariance for derived parameters.
  • Perform sensitivity to nonessential bounds.
  • Report near-boundary warnings.

Further reading

Continue to Cholesky covariance and boundary problems.