nlmx
Complete NCA/PK/PD/ER software that talks with you. Type a request in plain English and Maxson, the built-in assistant, responds and runs it for you, from the raw dataset to the final report, without NONMEM. It is a single program of only about 30 MB that runs offline on your own operating system (Windows, macOS or Linux), with nothing else to install.
One program for the whole analysis
nlmx is a single, fast, reproducible program for population PK/PD work. It reads NONMEM datasets and control streams directly and covers every step of an analysis, from checking the data to the final report.
No NONMEM at run time
Needs no NONMEM, no network and no other software to run: just one program of about 30 MB for your operating system. It works from your existing datasets and control streams.
Reproducible by design
Every command writes tables, a report and publication figures, and gives the same results for any number of threads.
Talks with you
Type a request in plain English and Maxson, the built-in assistant, responds. It turns it into checked nlmx commands and runs them after your “yes”.
Just say what you want. Maxson responds.
No need to remember commands or options. Type a request in plain English and Maxson, the assistant built into nlmx, replies, shows you the exact command it will run, and runs it only after you say yes.
- Plain English in, checked commands out. A small language model (embedded, or a local server) turns your request into nlmx commands.
- Guardrails on every command. nlmx checks allowed commands and options, limits, the folders it may read, and keeps all output in a session folder.
- You stay in control. You see each command and approve it with a “yes” before anything runs. Or ask Maxson to guide you through doing it yourself from the built-in manual.
- It reports back. Maxson reads the results and tells you what was produced and where to find it.
- Fully reproducible. Each session keeps a transcript, an audit log and the commands to rerun.
maxson ▸ Hi, I’m Maxson. Tell me in plain English what you would like to do.you ▸ Fit the model in models/run101.ctl and draw the plots.maxson ▸ I will run this:
$ nlmx fit models/run101.ctl --plots
Go ahead? (yes/no)you ▸ yesmaxson ▸ ✓ Done. The estimates, tables and goodness-of-fit figures are in models/run101_fit/.maxson ▸ Here is how I read it: the fit ran to completion and the goodness-of-fit plots look reasonable, with predictions tracking the observations and residuals scattered around zero. Clearance and volume are estimated with sensible precision. It is worth checking the individual plots for any subjects the model fits poorly.you ▸ Now test weight, sex and eGFR on CL, and weight and sex on V, with both engines.maxson ▸ I will run this:
$ nlmx cov --ctl models/run101.ctl --covariates CL=WT,SEX,EGFR --covariates V=WT,SEX --method both --output out_both
Go ahead? (yes/no)you ▸ yesmaxson ▸ ✓ Done. The frozen and posterior results, a comparison and a draft covariate block are in out_both/. These are recommendations, so confirm any retained effect with a full fit.maxson ▸ Here is how I read it: weight on CL and V is supported by both engines, so it looks like the most robust effect. Sex and eGFR on CL are weaker, because only one engine flags them, so treat them as candidates rather than conclusions. A good next step is to refit with weight included and compare the objective function.you ▸ Great. Check the model with a VPC.maxson ▸ I will run this:
$ nlmx vpc models/run101.ctl
Go ahead? (yes/no)you ▸ yesmaxson ▸ ✓ Done. The pcVPC and the numerical predictive check are in models/run101_vpc/.maxson ▸ Here is how I read it: the observed percentiles sit mostly inside the simulated prediction intervals, so the model describes both the central trend and the spread well. Look closely at the late time points, where the observed curve drifts slightly from the median, which may point to the terminal phase.
Illustrative session with example results. Start your own with nlmx ask.
Every step, one command each
Commands follow the order of a real analysis. Each one writes its own tables, report and figures.
| Step | Commands | What you get |
|---|---|---|
| Check the dataset and control stream | qc-data, qc-nm | Checklists with a verdict, plus a corrected copy of the control stream |
| Explore the data | eda, nca | Exploratory plots and tables; non-compartmental analysis with report and figures |
| Build the base model | autoinit, screen, fit | Initial estimates from the data, structural screening, model fitting |
| Select covariates | cov, forest | Covariate model recommendations and forest plots |
| Evaluate the model | vpc, fit --plots | VPC, pcVPC, NPC and goodness-of-fit figures |
| Simulate | sims, generate, simulate-study | Simulated studies, exposure metrics and synthetic practice projects |
| Sample size and power | power | Sample size and power analysis |
| Exposure–response | er | Models for continuous, binary, ordinal, count and time-to-event endpoints |
| Ask in plain words | ask (Maxson) | Plain-word requests turned into checked commands |
What nlmx can do
Dataset and control-stream QC
qc-data runs 99 checks on the dataset and qc-nm runs 81 checks on the control stream. Each finding is PASS, COMMENT, WARN, FAIL or N/A, with a verdict of READY, READY WITH WARNINGS or NOT READY. Safe corrections go to a copy; your original is never changed.
Exploratory analysis
Draw the standard and custom exploratory plots and tables of a PK/PD dataset. Create or change columns in R syntax before eda, er or nca.
Non-compartmental analysis
WinNonlin-style rules: linear, linear-log or linear-up/log-down trapezoids, six BLQ rules, best-fit λz, partial AUCs, steady-state parameters, dose proportionality, group comparisons and absolute bioavailability. An independent implementation agrees to about 1e-15.
Initial estimates and screening
autoinit derives initial estimates from the dataset alone with three methods (NCA, per-subject least squares, machine-learning regression). screen compares 1-, 2- and 3-compartment structures, 1- and 2-compartment TMDD and, on request, transit absorption.
Model fitting
Fit with FO, FOCE, FOCE-I, Laplace and SAEM. Goodness-of-fit plots can be back-transformed, stratified and filtered, and every estimation setting is written out.
Covariate selection
Starts from a completed base model, fitted with nlmx or with NONMEM, and evaluates parameter–covariate relationships with two engines and a comparison of their answers. NONMEM is never required.
Predictive checks and forest plots
vpc simulates the dataset 1000 times for a VPC, pcVPC or pvcVPC, plus an NPC in every run. forest draws covariate-effect forest plots with confidence intervals from the covariance matrix or bootstrap/SIR sets.
Study simulation
sims replaces the generate-in-R, simulate-in-NONMEM, summarise-in-R workflow: it builds a pediatric, adult or mixed population (CDC growth charts for ages 2–20), simulates it and reports steady-state Cmax, Cmin, Cavg and AUCτ in parallel and reproducibly.
Synthetic projects
generate writes practice projects of any design: structure, route, dose groups, sampling, variability and true covariate effects, optionally as a $DES (ADVAN13) model.
Exposure–response
Linear, log-linear, Emax, sigmoid Emax and hockey-stick models for continuous endpoints; logistic, proportional-odds and Poisson models; Kaplan-Meier by exposure quartile, log-rank and Cox models; placebo correction, covariates, model comparison and bootstrap.
Covariate selection from an nlmx or NONMEM model
Where nlmx began, and still its most distinctive part. Start from a completed base model, whether you fitted it with nlmx or with NONMEM, so NONMEM is never required. List the covariates to test on each parameter (CL = ["WT", "AGE", "SEX"]) and nlmx does the rest.
- Detects each covariate’s type: continuous, binary or categorical.
- Tries the typical equation: a power model
(COV/median)**θfor continuous covariates and a proportional shift(1 + θ)per level for binary and categorical ones.--all-equationsalso tries exponential, linear and grouped forms and keeps the best per pair. - Decides which covariates are retained, refits them jointly and reports the final covariate model with its objective function value.
| Method | Question it answers |
|---|---|
frozen | Frozen-model efficient score test: does the data push each candidate coefficient away from zero at the base solution? Includes univariate and conditional tests, forward/backward selection and uncertainty propagation. |
posterior | Posterior random-effect stability selection: which covariates repeatedly explain between-subject variability across posterior draws, resamples, perturbations and several learners? |
both | Both engines plus a comparison: where do the two lines of evidence agree? |
Covariate-selection results are recommendations. Confirm every retained relationship with a full model fit (nlmx fit or NONMEM) before using it for inference or submission.
From a synthetic project to a covariate model
These commands are taken from the nlmx documentation. generate writes a practice project so you can try everything without your own data.
# a synthetic project; the base model is fitted by ML
nlmx generate --output demo
cd demo
# quality control of the dataset and the control stream
nlmx qc-data data/analysis.csv
nlmx qc-nm models/run101.ctl
# covariate selection with each engine
nlmx cov --config nlmx.covar --method frozen --output out_frozen
nlmx cov --config nlmx.covar --method posterior --output out_posterior
nlmx cov --config nlmx.covar --method both --output out_both
# the same without a configuration file
nlmx cov --ctl models/run101.ctl --covariates CL=WT,SEX,EGFR,CRCL --covariates V=WT,SEX
# explore, analyse, fit and check
nlmx eda data/analysis.csv --group DOSE
nlmx nca data/analysis.csv
nlmx fit models/run101.ctl --plots
nlmx vpc -c nlmx.vpc --plotsCommands, options and settings files are documented in the project README and its docs folder on GitHub.
Reports, tables and figures you can audit
A covariate run writes a complete, checkable record of what was done.
Report and log
report.md and report.html (inline-SVG charts, light and dark), plus a complete stage-by-stage log.
Draft model
draft_model.ctl and a draft covariate block you can take into a full model fit.
Provenance
input_manifest.json holds the SHA-256 of every input, and checksums.sha256 covers the outputs.
Tables
CSV and JSON tables for every equation tried, candidate results, selection probabilities and diagnostics.
Figures
Publication figures as PNG, with SVG copies on request.
Resume
Runs can be resumed; a resumed run matches an uninterrupted one.
Checked against known answers
- Objective reproduction.
validaterecomputes the base-model OFV and compares it with the.ext: the analytic example reproduces −2880.2130 exactly, and its$DESversion reproduces the same value. - Refits.
--refine Nre-estimates the base parameters with each shortlisted candidate and reports a likelihood-ratio ΔOFV, the quantity stepwise covariate modelling uses. - Recovery. With 1000 simulated subjects the joint refit gives V~WT = 0.998 (truth 1.0).
- Operating characteristics.
nlmx simulate-studymeasures sensitivity, false-positive rate, proxy selection and exact-model recovery across designs. - Determinism. Results are bit-identical for any
--threadsvalue.
Get nlmx
Tagged releases publish signed binaries for Windows, macOS and Linux, so there is nothing to compile. Build-from-source instructions for each platform are in the README on GitHub.
The assistant’s language-model runtime is based on llama.cpp. See the README on GitHub for step-by-step instructions for each platform.
| Details | |
|---|---|
| Version | 4.2.1 |
| Size | About 30 MB, a single offline program |
| Licence | CC BY-ND 4.0: use, copy and share unmodified, with credit. Modified distribution needs the author’s permission. |
| Author | Obinna (Obi) Obianom |
| Cite as | Obianom O. nlmx: complete PK/PD pharmacometrics software, version 4.2.1 (2026). https://hyperpkpd.com |
Frequently asked questions
Does nlmx need NONMEM?
No. nlmx needs no NONMEM, no network and no other software at run time. It reads NONMEM datasets and control streams directly. Covariate selection starts from a completed base model, fitted either with nlmx or with NONMEM, so NONMEM is never required.
Which estimation methods does nlmx support?
nlmx fits models with FO, FOCE, FOCE-I, Laplace and SAEM, and can reproduce the objective function value of a NONMEM base model from its .ext file.
Can I trust the covariate results?
They are recommendations. nlmx reports the evidence from two engines and refits the retained effects jointly, but you should confirm every retained relationship with a full model fit before using it for inference or submission.
What is Maxson?
Maxson is the assistant built into nlmx. A small language model turns a plain-word request into nlmx commands, which nlmx checks against its guardrails and runs only after you say yes. Every session keeps a transcript, an audit log and the commands to rerun.
Does nlmx send my data anywhere?
No. nlmx needs no network at run time and the assistant runs from an embedded model or a local server.
What licence is nlmx under?
Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0). You may use, copy and share it unmodified, including commercially, with credit and a link to the licence.