11.28 Case study 1: file, header and value defects
Suppose a received file begins with a UTF-8 BOM, uses Subject ID as a column name, contains NA in WT, and has one row with an extra comma:
Subject ID,TIME,DV,WT
001,0,.,70
001,1,2.4,NA
002,0,.,82,
Likely findings
FIL02 identifies the BOM. HDR05 rejects the space in Subject ID. VAL03 identifies NA as an incompatible numeric missing marker. FIL08/FIL09 identify the row width/trailing delimiter. VAL09 also asks whether 001 and 1 remain distinct numerically.
These are separate consequences. Removing the trailing comma does not resolve the missing marker or ID design.
Investigation
Confirm the transfer specification, encoding and delimiter. Determine whether WT is truly missing and what the analysis policy will be. Build a controlled numeric ID and retain original subject identity in a DROP column. Rename the header only through the documented derivation process.
Corrected analysis representation
ID,ORIGID,TIME,DV,WT
1,001,0,.,70
1,001,1,2.4,.
2,002,0,.,82
The corrected file needs a final newline, consistent ASCII/UTF-8 encoding and an $INPUT that DROPs ORIGID if it remains text. The missing WT still requires an explicit policy; replacing NA with . improves readability but does not impute a value.
Expected rerun evidence
FIL02, FIL08/FIL09, HDR05 and VAL03 should move to PASS after the controlled re-export. VAL09 should PASS only after the numeric ID mapping is verified. COV02 may still warn because WT remains genuinely missing; that is correct behavior. The rerun therefore demonstrates an important lesson: a technical-format repair can reveal the next scientific-data question rather than producing an immediately clean verdict.
Common mistakes
- Fixing the file manually without retaining the received original.
- Replacing NA with zero.
- Removing leading zeros without an ID mapping.
- Assuming the parser's first failure is the only defect.
Checklist
- Preserve and hash the received file.
- Correct export/derivation code, not one-off cells.
- Retain original-to-analysis ID mapping.
- Rerun file, header, value and downstream checks.
Further reading
See file checks, header checks and value checks.