Why a Flag Must Agree With the Record
A below-quantification flag is a compact way to represent a laboratory result in a population pharmacokinetic data set. It is useful only if it faithfully records what the laboratory reported. A flag assigned from a concentration alone can contradict the result status; a flag copied from a status field without checking the assay limit can also preserve an inconsistency. Either error can make later analyses difficult to interpret.
The earlier material on separating missing, zero, and below-quantification results distinguishes these result types. Here the task is narrower: define a reliable flag for each record, verify that it agrees with the reported result and applicable limit, and keep uncertain records from appearing definitive. The limit used in an audit must be the one applicable to that record; this tutorial assumes it is available and does not resolve conflicting assay metadata.
The flag is not a replacement concentration. In particular, \(B_i=1\) does not mean that the concentration equals zero, and \(B_i=0\) does not say anything about the size of the concentration beyond its being a valid quantified result. Retain the reported result and its status alongside the flag.
Record-Level Consistency Rules
For each record, identify the reported result status, the reported result itself, and the applicable limit \(L_i\), all in compatible units. The status may indicate a quantified result or a below-quantification result. A quantified result is represented by a numeric concentration \(y_i\). A below-quantification result may instead be recorded as a qualifier and bound, such as “less than \(L_i\).” That bound is not a measured concentration.
For the examples below, use the stated convention that a quantified result at or above the limit is valid: \(y_i \geq L_i\). A laboratory may specify a different boundary convention, so the convention documented for the assay must govern the actual data. The main requirement is that the chosen convention be explicit and applied consistently.
This rule uses both the status and the result. It does not infer the status from a numeric value alone. For example, a number below the limit attached to a quantified status is a discrepancy to investigate, not a reason to silently change the status or keep a definitive \(B_i=0\). Likewise, a below-quantification status paired with a numeric value above the limit is inconsistent unless the data dictionary explains that the numeric field is a separate non-reportable signal rather than the reported concentration.
The distinction between a reported bound and a numeric concentration matters. If a result is recorded as “< 0.20 mg/L,” then 0.20 mg/L describes the reporting bound; it is not a measured concentration to be placed in the concentration field as though the sample measured exactly 0.20 mg/L. Preserve the raw report, and store any bound in a field whose meaning is explicit.
Worked Examples
Worked Example: Assigning Flags to Consistent Results
Suppose a hypothetical assay uses a quantification limit of \(0.20\) mg/L and the documented convention is that a quantified result must be at least the limit. Consider three records: A is reported quantified at \(0.46\) mg/L; B is reported “< 0.20 mg/L”; and C has no result because the specimen was not tested.
Record A. The status is quantified, and the numeric result satisfies \(0.46 \geq 0.20\) mg/L. The status and value agree, so \(B_A=0\). The concentration remains \(0.46\) mg/L.
Record B. The status and report indicate a result below the \(0.20\) mg/L limit. The report is consistent with the limit, so \(B_B=1\). The reported bound is retained as “< 0.20 mg/L”; it is not converted into a measured concentration of \(0.20\) mg/L.
Record C. There is no reported result to classify. Its flag is undefined, not zero and not one. A separate missing-result or review field can describe why the flag is unavailable.
The check is not “is there a number?” It is whether the reported status and result make a consistent, interpretable record against the applicable limit.
Worked Example: Resolving Conflicting Status and Concentration
In a hypothetical audit, the applicable limit for four records is \(0.20\) mg/L. Record 1 is quantified at \(0.31\) mg/L; Record 2 is reported “< 0.20 mg/L”; Record 3 is labelled quantified at \(0.12\) mg/L; and Record 4 is labelled below quantification but has a reported concentration of \(0.28\) mg/L. Assume the numeric fields for Records 3 and 4 are described as reported concentrations, not separate instrument signals.
Record 1: \(0.31 \geq 0.20\) mg/L, and the status is quantified. Assign \(B_1=0\).
Record 2: The below-quantification status and reported bound agree with the limit. Assign \(B_2=1\).
Record 3: The status says quantified, but \(0.12 < 0.20\) mg/L. The value does not satisfy the stated quantified-result rule. Mark the flag unresolved; do not retain a definitive \(B_3=0\) while the contradiction is under review. The laboratory record must be clarified before a definitive flag is assigned.
Record 4: The status says below quantification, but the reported concentration is \(0.28 > 0.20\) mg/L. This also conflicts with the rule. Mark the flag unresolved rather than assigning a definitive \(B_4=1\).
Thus, only Records 1 and 2 receive definitive binary flags. Records 3 and 4 are both unresolved pending review. This does not establish which field is wrong in either record; it prevents a conflict from being disguised as a valid flag.
Worked Example: Creating an Auditable Data Structure
A hypothetical data extract contains the raw result “< 0.10 mg/L” for one sample and a quantified concentration of \(0.15\) mg/L for another. The applicable limit is \(0.10\) mg/L for both, and the documented quantified-result convention is \(y_i \geq L_i\). Show how to derive the flags without overwriting the reported results.
For the first sample, retain the raw result string “< 0.10 mg/L,” record the status as below quantification, and store the applicable limit as \(0.10\) mg/L. The status and bound agree, so set \(B_1=1\). There is no quantified concentration to enter as the sample result.
For the second sample, retain the reported concentration \(y_2=0.15\) mg/L and status quantified. The check is
The check passes, so set \(B_2=0\). A tidy record keeps the raw result, reported status, applicable limit, derived flag, and review state in distinct fields. This lets a reviewer reproduce the flag and see what was originally reported.
Why the Rule Works
The flag is a two-category encoding, but only after a record has been shown to belong unambiguously to one of those categories. Let \(V_i\) indicate that record \(i\) has enough information and that its status, result, and applicable limit agree. Then the flag is defined only where \(V_i=1\):
This construction prevents a basic logical error. If every record were forced into \(B_i=0\) or \(B_i=1\), a contradiction such as a quantified result below the limit would be represented as though it had been resolved. Keeping the flag undefined records the actual state of knowledge: the data do not yet support either definitive category.
A useful audit sequence is therefore:
Locate the reported status, raw result, applicable limit, and units. Confirm that a numeric value is a reported concentration rather than a distinct signal or bound.
If the result or status is missing, or the meaning of a field is unclear, do not assign a definitive binary flag.
For a quantified numeric result, apply the documented boundary convention. For a below-quantification result, verify that its qualifier and bound agree with the applicable limit.
Set \(B_i=0\) or \(B_i=1\) only for a consistent record. Otherwise, record an unresolved review state and retain the source information.
Store the derived flag separately from the original report, along with enough information to reproduce the check and document any later clarification.
Diagnostics, Alternatives, and Limitations
A simple diagnostic is to count records by reported status and derived flag, then inspect every mismatch and every undefined flag. Also check for impossible or unexpected combinations, such as a quantified status with a below-limit concentration under the stated convention, a below-quantification qualifier paired with a larger reported concentration, or a definitive flag where the result is absent. These checks identify records requiring review; they do not determine which source field should be corrected.
There are two common encoding approaches. One is to copy a laboratory status into a binary flag. This is quick, but it may preserve miscoded statuses and does not verify agreement with the result and limit. The other is to derive a flag from the numeric concentration alone. This cannot classify a below-quantification report that has no numeric concentration, and it can conceal a conflict between status and value. The more reliable approach is to retain the reported status, check it against the applicable limit and result, and derive the binary flag only for consistent records.
Replacing a below-quantification result with zero, the limit, or a fraction of the limit is not a way to build this flag. Such substitutions alter the representation of the result and do not resolve whether the status and limit agree. Keep the flag, the raw result, any reported bound, and any later analysis representation conceptually separate.
The flag is only as reliable as its inputs. If units differ, the reported limit is unavailable, the status labels are undocumented, or the boundary convention is unclear, automated classification can create false certainty. A limit that may differ across records must be established for each record before this check can be trusted. A flag also does not prove that the laboratory measurement or source record is correct; it only records a consistent classification based on the fields supplied.
Common Mistakes
- Assigning \(B_i=0\) just because a numeric result is present. Check that the status says quantified and that the value meets the applicable limit.
- Assigning \(B_i=1\) to every numeric value below the limit. A below-limit value paired with a quantified status is a discrepancy, not automatically a valid below-quantification result.
- Treating the limit in “< \(L_i\)” as a measured concentration. It is a bound in that report, unless a separate field explicitly identifies a measured numeric value.
- Forcing an unresolved record into a binary category. Withhold a definitive flag until the conflict or missing information is clarified.
- Overwriting the raw report with the derived flag. Keep source information and derived fields separate so the classification can be checked and revised transparently.
Check Your Understanding
For each question, decide what the flag should be under the convention that quantified results satisfy \(y_i \geq L_i\). Then compare with the solutions.
- A result is reported quantified at \(0.24\) mg/L, with \(L_i=0.20\) mg/L. What is the flag?
- A result is reported “< 0.20 mg/L,” with \(L_i=0.20\) mg/L. Is 0.20 mg/L the measured concentration, and what is the flag?
- A result is labelled quantified at \(0.18\) mg/L, with \(L_i=0.20\) mg/L. Should \(B_i=0\) remain definitive?
- A sample has no result and no result status. Should its flag be zero, one, or undefined?
Solutions. (1) \(0.24 \geq 0.20\) mg/L and the status is quantified, so \(B_i=0\). (2) The limit is the reported bound, not a measured concentration; the consistent below-quantification result has \(B_i=1\). (3) No. The quantified status conflicts with \(0.18 < 0.20\) mg/L, so the flag is undefined pending clarification. (4) Undefined: neither result category is established, and a missing result must not be encoded as either binary flag.