16.4 Filters, BLQ censoring, and log DV
--filter applies an R-style condition to every record. Failed dose and observation rows are removed. --obs-filter applies only to observations and preserves doses, making it safer for analyte selection when dose rows lack DVID.
nlmx autoinit pk.csv --filter 'STUDY != 3' `
--obs-filter 'DVID == 1 & BLQ == 0'
Supported expressions include comparisons, Boolean operators, arithmetic, parentheses, and %in% c(...). Text needs quotes. Empty or . cells compare as empty text. Unknown unquoted words are interpreted as column names and produce a helpful error.
BLQ differs by method
--lloq 0.05 or [data] lloq identifies values below a numeric limit. --blq-flag COLUMN or [data] blq flags observations with any nonzero value. Concentrations at or below zero are censored.
Autoinit NCA ignores censored observations. ML retains censoring information: a simulated prediction is penalized when it lies above the limit, rather than treating the unknown true value as an observed zero. NLS fitting uses measurable values. These different treatments are one reason method availability or estimates can differ in BLQ-heavy data.
--dv-log declares that DV is natural-log concentration. This is not a request to log-transform values; it changes how the reader interprets them. Verify LLOQ scale and output concentration scale with a small fixture.
No mutation stage
Unlike EDA/NCA, autoinit does not apply --mutate, and [data] mutate is rejected. Perform unit conversion or derived-column preparation in a reproducible upstream step, write the analysed dataset, and hash it.
Common mistakes
- Removing dose rows with an analyte row filter.
- Replacing BLQ with zero and also flagging it as BLQ.
- Passing already logged DV without
--dv-log. - Assuming shared
--mutatehelp applies.
Checklist
- Count records before and after both filters.
- Preserve dose records for observation-only selection.
- Map LLOQ/BLQ and verify scale.
- Inspect method-specific consequences of censoring.
- Prepare transformations upstream with provenance.
Further reading
See dataset schema, ML censoring behavior, and sparse worked example.