This chapter is a lookup reference for nlmx 4.16.1. Option tables are generated from the installed release executable. Read an option in the context of the command page: nlmx uses a global parser, but an accepted option can be irrelevant to a command unless its help text names that command or the command's method chapter defines the behavior.
The safe sequence is: identify the installed version, open that command's help, freeze input/settings/output paths, run into a new or empty output directory, inspect both the process status and the command-native verdict, and retain the log/resolved settings/checksums. A command line is reproducible only when its referenced files and software version are also frozen.
Synopsis
nlmx generate [OPTIONS]
Required context. A generation design from .gen settings or a supported preset, and a new/empty output project directory.
What it does. Creates a complete synthetic NONMEM project: truth model, dataset, fitted base model, and ready configurations for subsequent commands.
Principal outputs. Synthetic dataset, truth/base control streams and model artifacts, generated settings for analysis commands, project documentation, logs, and checksums.
Start with installed help and, when available, generate the complete settings template before entering study choices. Run into a new or empty output folder. After completion, review the command's native summary/verdict, warnings, logs, resolved settings, and checksum manifest—not only the console's final line.
Complete installed option reference
The following 56 options are parsed directly from nlmx 4.16.1 generate --help. The unmodified txthelp snapshot and its SHA-256 are preserved in the jsonhelp inventory. Shared descriptions sometimes mention several commands; apply only the clause naming generate unless its method chapter specifies otherwise.
Options
Option
Installed description
-h, --help
Print help
Method
Option
Installed description
--method <METHOD>
Selection engine: frozen | scm (stepwise forward/backward on refits) | posterior | both (overrides method in the config)
--threads <THREADS>
Worker threads for subject- and replicate-level parallelism (default: all cores). Results do not depend on this value
Input selection
Option
Installed description
--data <DATA>
Analysis dataset (overrides $DATA); sims: simulate this dataset instead of generating one
Core
Option
Installed description
-c, --config <FILE>
Settings file of the command (TOML syntax), with the command's extension: .covar (cov, posterior, inspect, validate, fit), .qcd, .qcn, .eda, .nca, .init, .screen, .vpc, .forest, .sims, .er, .power, .gen, .ask
-o, --output <OUTPUT>
Output directory
--run-dir <RUN_DIR>
Existing run directory, for resume
--overwrite
Allow writing into a non-empty output directory
--dry-run
Run the validation pipeline instead of the full analysis
--no-checkpoint
Do not write replicate checkpoints (posterior engine)
Frozen method
Option
Installed description
--approximation <APPROXIMATION>
Likelihood approximation: auto (from $ESTIMATION, default) | fo | foce | foce-i | laplace; fit and screen also accept saem (SAEM with an importance-sampling objective); screen default foce-i
generate, simulate-study: subjects in total (generate: split evenly over the groups unless
--subjects-per-group is given)
--structure <STRUCTURE>
generate: model structure, e.g. 1cmt-oral (default), 2cmt-iv, 3cmt-infusion, 2cmt-oral-lag; parts may also be given with --compartments, --route and --lag
--groups <N>
generate: number of treatment groups (default: the number of --doses, or 1)
--group-names <LIST>
generate: group names, comma separated, e.g. "Low,Mid,High" (default Group 1, Group 2, …)
--doses <LIST>
generate: dose (amount) of each group, comma separated, e.g. 50,100,200 (one value: every group; default 100)
--subjects-per-group <LIST>
generate: subjects in each group, one value for all or one per group, e.g. 20 or 20,20,40
--n-doses <N>
generate: doses per subject (default 1; ADDL = N - 1); sims: number of doses, the last interval is analysed (default 1)
--dose-interval <H>
generate: dosing interval in hours (default 24)
--infusion-duration <H>
generate: infusion duration in hours for --route infusion (default 1); sims: infusion time in hours (0 = bolus or oral; needs a RATE item in $INPUT)
--sample-times <LIST>
generate: sampling times (h after each sampled dose), comma separated (default by structure and route); sims: sampling times in hours after the last dose (default 12 times over the interval)
--sparse-samples <N>
generate: sparse sampling: this many samples per subject, drawn at random from the sampling times
--typical <LIST>
generate: true typical values, NAME=VALUE list, e.g. "CL=5,V=50,KA=1.5" (names: CL, V, Q, VP, Q2, VP2, KA, ALAG)
--iiv <LIST>
generate: between-subject variability as CV %, NAME=CV list, e.g. "CL=30,V=25,KA=40" (0 = no ETA)
generate: additive residual error, SD in concentration units (default 0.02)
--effects <LIST>
generate: true covariate effects, PARAMCOV=VALUE list, e.g. "CLWT=0.75,VWT=1,CLAGE=-0.3,CL~SEX=0.8" (continuous: power exponent at the median; SEX: factor for SEX = 1). Covariates: WT, AGE, SEX, EGFR, CRCL
--no-covariate-effects
generate: simulate without any covariate effect
--covariate-model
generate: also fit the true covariate model (effects estimated) as models/run102, ready for forest
--author <NAME>
generate: author named in the header of every control stream (default Obinna Obianom); report: author of the document
--ode
generate: write the models as $DES (ADVAN13) instead of the analytic ADVANs
--no-fit
generate: write the data and control streams only, without fitting the base model
--gof-plots
generate: also draw the goodness-of-fit plots of the fitted models into gof/ (needs the fit; with --covariate-model the true model's plots carry truth in their file names)
--study-replicates <STUDY_REPLICATES>
Replicate datasets per scenario (simulate-study)
--scenarios <SCENARIOS>
Scenarios for simulate-study (comma separated): rich, sparse, high-shrinkage, correlated, rare-category
--scm-reference
Include a refit-based stepwise (SCM) reference in simulate-study
Fit
Option
Installed description
--max-iterations <MAX_ITERATIONS>
fit, screen: maximum estimation iterations (default 300, or 0 when $EST has MAXEVAL=0); 0 only evaluates the objective and individual estimates at the initial values
VPC
Option
Installed description
--lloq <VALUE|COLUMN>
vpc, autoinit, screen: lower limit of quantification (vpc: a number or a data column; autoinit, screen: a number); values below it are censored / left out
--print-config <FILE>
write the command's annotated settings template to FILE (with the command's extension, e.g. nlmx.eda, nlmx.vpc) and exit
Dataset (autoinit, screen)
Option
Installed description
--route <ROUTE>
autoinit, screen: administration route: auto (default: RATE > 0 = infusion; with CMT, a dose into the observed compartment = IV bolus, else oral; without CMT, the profile shape decides: rising after the dose = oral, highest at the first sample = IV) | oral | iv (bolus, or infusion when RATE > 0) | bolus | infusion | mixed (oral and IV told apart by CMT)
Screen
Option
Installed description
--compartments <LIST>
screen: numbers of compartments to try, e.g. 1,2,3 (default)
--lag <MODE>
screen: absorption lag time: no (default) | yes | both (models with and without)
--error <MODEL>
screen: residual error model: combined (default) | proportional | additive (with --dv-log: exponential, additive on the log scale)
Plots (vpc, fit, autoinit, screen, nca)
Option
Installed description
--plots
vpc, fit, autoinit, screen: also write publication plots to <output>/plots (PNG, theme_classic style)
--plot-format <FORMAT>
plots: png (default) | svg | both
Interpretation and common failure
Synthetic truth is defined by the generator settings, not real-world evidence. Record seed/design, distinguish truth from fitted estimates, and never mix generated data with clinical data directories.
The detailed method and examples are in the relevant book chapter. Common nonzero process classes are documented on 36.35. A process exit of zero still requires command-native scientific and numerical review.
Minimal handoff record
Record the version, exact command and working directory, input/settings hashes, selected options and defaults, output path, process exit, native verdict or convergence state, warnings/exclusions, principal results with uncertainty, checksum verification, and reviewer disposition.