Estimate a NONMEM model with nlmx's own estimator and write NONMEM-format results (.ext .cov .cor .coi .phi), a final control stream, predictions/residuals, a parameter table and a report. Observations taken before any drug are left out (--keep-predose keeps them); predictions.csv carries DVID and --carry-columns; the goodness-of-fit plots can be back-transformed (--gof-back-transform), stratified (--gof-stratify) and filtered (--gof-filter); --print-options writes every estimation setting out Usage: nlmx fit [OPTIONS] [CONTROL_STREAM] Arguments: [CONTROL_STREAM] Control stream to estimate (.ctl/.mod); same as --ctl Options: -h, --help Print help Method: --method Selection engine: frozen | scm (stepwise forward/backward on refits) | posterior | both (overrides `method` in the config) --threads Worker threads for subject- and replicate-level parallelism (default: all cores). Results do not depend on this value Input selection: --model-dir Directory holding one NONMEM run family, matched on a common stem (e.g. run101.ctl/.ext/.cov); power: the folder with the run's .ext and .cov --files Explicit [files] manifest (.txt); paths resolve against the manifest location --ctl Control stream (.ctl/.mod) --ctls ... fit: run `fit` once for every control stream matching the patterns (file names, folders, or wildcards `*` `?` and `**` such as `*.ctl` or `./xyz/*.mod`), each with all the other options (--retry, --approximation, ...); every run has its own output folder (_fit next to its control stream, or / with --output) and log --ext Final estimates (.ext); sims: the parameter values of --estimates final; power: the final estimates (default: those of the control stream) --cov Parameter covariance matrix (.cov); sims: with it every simulation of the study uses a new parameter set (parameter uncertainty); power: needed for --uncertainty --cor Parameter correlation matrix (.cor) --data Analysis dataset (overrides $DATA); sims: simulate this dataset instead of generating one --lst NONMEM listing (.lst) --phi Individual estimates (.phi) --table Table file with ID and ETA columns (.tab), used when no .phi is available --run-stem Disambiguate a directory containing several runs --recursive Scan --model-dir recursively (still rejects ambiguity) Core: -c, --config 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 directory --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: --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 --uncertainty Enable MVN resampling of the frozen parameters from the .cov Shared numerics: --seed Master seed (uncertainty draws, resampling, posterior draws, vpc simulations, autoinit ML) --strict Promote every warning to an error Logging and output: --suppress-console <0|1> 0 (default) prints progress to the terminal; 1 silences it (the log is still written) --log-file Write the transcript here instead of log_.txt --no-color Disable ANSI colour --license Print the license (CC BY-ND 4.0), the third-party components, how long this version may be used and how to contact the author, and stop -v, --verbose... Increase verbosity (repeatable: info -> debug -> trace) -q, --quiet Errors only on the terminal (the log file is unaffected) --keep-subject-ids Do not hash subject identifiers in outputs --format Output format for `schema`: txt | toml | json | json-schema [default: txt] Generate and simulation study: --model generate, simulate-study: preset project: analytic (default) | ode | iov-blq Fit: --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 --gradient-tolerance fit, screen: gradient tolerance on the internal (transformed) scale (default 1e-3) --cov-step fit, screen: run the covariance step even without $COVARIANCE --no-cov-step fit, screen: skip the covariance step even when $COVARIANCE is present --retry fit: retry a failed estimation up to N times (0 to 10, default 0 = no retry). A run fails when it stops with a numerical error or does not converge. Retry 1 starts from the autoinit estimates of the dataset, each further retry from those values changed at random by up to +/-15% (--seed); the retries are written to /retries/ and the first one that converges ends the loop --cov-matrix fit: covariance matrix: rsr (sandwich, NONMEM default) | r | s (default: $COV MATRIX=) --start-from-ext fit: start from the estimates in --ext instead of the control stream's initial values --stem fit: file stem for the NONMEM-format outputs (default: the control stream's stem) --saem-burn fit (SAEM): maximum burn-in iterations (default: $EST NBURN, else 1000; ends earlier once stationary unless NBURN was set explicitly without CTYPE) --saem-iter fit (SAEM): accumulation iterations with step size 1/k (default: $EST NITER, else 300) --saem-chains fit (SAEM): MCMC chains per subject (default: $EST ISAMPLE, else 2) --is-samples fit (SAEM): importance-sampling draws per subject for the objective and the covariance step (default: ISAMPLE of a following $EST METHOD=IMP, else 300) --no-table fit: do not write predictions.csv (PRED, IPRED, residuals, ETAs per observation) --carry-columns fit: dataset columns also written to predictions.csv, comma separated (e.g. STUDY,DOSE); DVID is always carried when the dataset has it ([output] carry_columns) --gof-back-transform fit: back-transform DV, PRED and IPRED before the goodness-of-fit plots: exp (the model is fitted on ln DV) | exp10 (on log10 DV); residuals are left as they are --gof-stratify fit: also draw the goodness-of-fit plots for each level of this dataset column (e.g. DVID, STUDY, DOSE) --gof-filter fit: observations kept for the goodness-of-fit plots, R syntax on dataset columns and the values of predictions.csv (DV, PRED, IPRED, TIME, CWRES, …, before any back-transformation), e.g. "TIME > 0 & DVID == 1" --print-options fit: print the estimation settings of this control stream as command-line options, every one written out (approximation, iterations, tolerance, covariance step, SAEM), and stop --keep-predose fit: keep in the estimation the observations taken before any drug was given (before the first dose, at its time with nothing absorbed yet, or of a subject without doses); by default they are left out when the model predicts 0 there, as their DV cannot be drug Plots (vpc, fit, autoinit, screen, nca): --log-y vpc, fit: same as --y-scale log --x-scale vpc, fit, autoinit: x axis of the plots: linear (default) | log (semi-log; values ≤ 0 are not drawn) --y-scale vpc, fit, autoinit: y axis of the plots: linear (default) | log (semi-log; fit: the DV plots only) --plots vpc, fit, autoinit, screen: also write publication plots to /plots (PNG, theme_classic style) --plot-width plots: figure width in --plot-units (default 7 in) --plot-height plots: figure height in --plot-units (default 5 in) --plot-units plots: units of width and height: in (default) | cm | mm | px --plot-dpi plots: resolution in dots per inch (default 300) --plot-base-size plots: base font size in points (default 11, as ggplot2) --plot-format plots: png (default) | svg | both --plot-colors plots: colours as NAME=COLOUR pairs, e.g. median=#E41A1C,outer=#377EB8,points=grey (names: median, outer, observed, points, outside, reference) --plot-no-title plots: no chart title (for a figure caption) --plot-no-legend plots: no legend VPC: --legend-position vpc, fit, autoinit, screen: legend position on the charts: bottom (default) | top --no-caption vpc, fit, autoinit, screen: no grey caption (check, observations, date) under the charts --no-svg vpc, fit, autoinit, screen: write no SVG files at all (neither svg/ nor plots/svg/); PNG plots and the HTML report are unaffected Dataset (autoinit, screen): --id-col autoinit, screen: subject identifier column (default ID) er: subject column (default ID when present) Autoinit: --scale autoinit: the scaling of the target control stream, e.g. V/1000 for S1 = V/1000 (dose mg, concentrations ng/mL), V*1000, or a divisor (1000). Volumes and clearances are reported in its units and the NONMEM blocks carry the same S line This lists the options of `nlmx fit` only (454 options of other commands are not shown). `nlmx --help` lists every option of every command.