Documentation

22.32 Draft model coding, MU referencing, and confirmation

draft_model.ctl inserts retained covariate effects and new THETAs into the base stream. For a MU-referenced exponential-ETA parameter, nlmx adds the log of the multiplicative factor to MU so SAEM/IMP-friendly structure is preserved.

MU-referenced draft coding

For a power WT effect on CL:

MU_1 = LOG(THETA(1)) + THETA(5)*LOG(WT/72.2)
CL   = EXP(MU_1 + ETA(1))

For a binary proportional factor, the draft adds LOG(1+effect) on the MU scale. Parameters without exponential ETA may receive a multiplicative assignment after their last definition. Bounds keep applicable factors positive over observed support.

Review parameter ordering, labels, initial values, bounds, FIX/SAME/BLOCK structure, covariate aliases, IF logic, reference values, and the location of inserted code. Multiple assignments or conditional branches can make automatic placement semantically wrong even when syntax is valid.

Fit the draft explicitly. Confirm convergence, final estimates, OFV, covariance, boundaries, shrinkage, GOF, VPC, and clinical effects. For regulatory or reference reproduction, fit in NONMEM and compare record inclusion, likelihood, estimates, and predictions under predefined tolerances.

Never hand-edit the draft silently. Version the generated file and subsequent modifications with rationale.

Reviewing generated model code

Compare the draft against the base control stream line by line. Confirm parameter labels and indices, ETA association, MU equation, reference values, category coding, form, coefficient bounds, initial values, and whether mandatory/excluded relationships were respected. Check that the code applies the covariate at the intended event time and that all variables exist in $INPUT. MU-referenced models require particular care: an additive term on the MU/log scale corresponds to a multiplicative effect on the natural parameter scale. Compile and fit the draft in a new run directory, then compare the implemented equation with equations.csv. Generated code is an auditable starting point, never automatic approval.

Common mistakes

  • Treating the draft as a final validated model.
  • Breaking MU referencing with a second assignment.
  • Ignoring coefficient bounds and reference coding.
  • Changing the draft without preserving the generated version.
  • Comparing NONMEM results without matching method/data settings.

Checklist

  • Diff draft against the base control stream.
  • Verify every inserted equation and THETA.
  • Preserve MU and random-effect parameterization.
  • Refit and run full diagnostics.
  • Confirm externally with documented tolerances when required.

Further reading

See Chapter 20 final-control handling, validation, and Chapter 40 future software differences.