Data Cleaning Documentation Template
The numbered exclusion cascade, the variable register with the denominators that actually apply, and the codebook generated from both.
Free download · No account needed
Case Exclusion Cascade
[Study name], [wave or extract]
Raw file [file name as received]
Received [date]
Analytic file [file name after cleaning]
Prepared by [name]
Step ID Rule as executed Removed Remaining 0 [raw file as received] — [N raw] 1 E1 [rule, in syntax, threshold visible] [count] [count] 2 E2 [rule, in syntax, threshold visible] [count] [count] 3 E3 [rule, in syntax, threshold visible] [count] [count] 4 E4 [rule, in syntax, threshold visible] [count] [count] 5 E5 [rule that defines the analytic sample] [count] [count] — [analytic file] — [N analytic] — Reconciliation: sum removed [total] [N analytic] — Share of raw file excluded [per cent]
Every row carries the rule, the count, who decided, the date, and whether a later analyst may reverse it. If the removed column does not sum to the difference, rows left for a reason nobody wrote down.
Reasons, not just counts
Rows lost because an institution left the study are not attrition. The cascade records the mechanism, because the mechanism is what the limitation note is written from.
The pack is eight files, one standing rule and eight prompts. Four sheets carry the arithmetic: the exclusion cascade, the variable register, the transformation register and the outlier decision log. Four documents carry the argument: the cleaning log, the codebook, the known limitation note, and a page on which facts stop being recoverable and when. The rule is that a decision is a rule plus a row count, never a description.
Every sheet ships filled in for one illustrative workforce survey. Six numbered exclusions take 4,812 raw responses down to 3,465 analysed, and the removed column sums to 1,347, which is exactly the difference. On one variable, 1,547 of 3,465 rows carry no value, a 44.6 per cent missingness rate that is simply wrong: 1,422 of those rows were never asked the question. On the denominator that applies it is 6.1 per cent. Forty-one cells holding 999 moved the same variable's mean from 27.2 hours to 6.4.
Observational reporting standards ask you to report numbers of individuals at each stage of study with the reasons at each stage. A template with a Description column produces none of that, because a description contains no arithmetic. Open the pack in River and the cascade gets written as the rules run, or download the documents and sheets and fill them in yourself. Hand the analytic file to the results section writer, the methods section, and the reproducibility record that checks the code against it. More research packs sit alongside this one.
What's in the pack
Case Exclusion Cascade sheet
Raw N, one numbered rule per exclusion with its syntax and threshold, rows removed, rows remaining, and a reconciliation row that does the subtraction in public.
Variable Register sheet
Every variable with its label, storage type, value labels, every missing code in use and what each one means, and the applicable denominator a missingness rate should use.
Transformation Register sheet
One row per derived variable: its sources, the rule as executed, what happens when an input is missing, and why the derivation takes this form and not the obvious one.
Outlier Decision Log sheet
How each flagged value was found, whether it turned out to be a sentinel, what the external check found, the decision, and the effect on the statistic as a number.
Cleaning Log
One section per rule: what was run, why the data needed it, what alternative was considered and rejected, and what the decision costs. Revisions are dated rather than overwritten.
Codebook
Generated from the register rather than written beside it, because two descriptions of the same variable drift apart within a month and the codebook holds the stale one.
Known Limitation Note
What the analytic file no longer represents, rule by rule, with the direction each exclusion pushes an estimate. Written while the reasons are still known rather than at submission.
A rule and a row count, never a description
The standing space rule every prompt reads first. ICPSR's own guidance is that there are at least six missing data situations, each of which should have a distinct missing data code.
How to use it
- 1
Open in River, or download it
Open the pack in River and the agent reads your file's metadata with you, or download the blank Word documents and CSV sheets instantly.
- 2
Send the native file, not an export
A Stata or SPSS file plus your eligibility criteria and your primary outcome. The export is where the missing-value meanings die, and they do not come back.
- 3
Register the variables before anything moves
Observed and missing counts per variable, every missing code and its meaning, and the applicable denominator. This is the only irreversible step, so it runs first.
- 4
Build the cascade as the rules run
One numbered row per exclusion with its count, then reconcile. If the column does not close, rows left for a reason nobody recorded, and the sheet says so.
Frequently asked questions
Is this template free?
Yes. Download the whole pack as Word documents and CSV sheets with no signup and no credit card. Edit with AI is a separate, optional path where the agent reads your data file and builds the register and the cascade with you. The template library holds the rest.
What format are the downloaded files?
Word documents for the four documents and the rule, and CSV for the four sheets, in one zip. They open natively in Word, Pages, Google Docs, Excel, Numbers and Sheets with nothing to convert. Inside River the same content opens as live Docs and Sheets.
Why does it insist on the native file rather than a CSV?
Because a delimited file cannot hold why a value is absent. Stata alone carries 27 missing values, the system one plus 26 extended codes that analysts use to record not asked, refused or not applicable. A CSV has one empty cell, and the export is not reversible.
I only have a CSV. Is the pack still useful?
Yes, with one honest loss. The cascade, the transformation register and the outlier log all work unchanged. The Variable Register records that the missing-value semantics are unrecoverable, and that becomes a line in the limitation note rather than a silent gap in the missingness rates.
Does River clean the data for me?
It proposes rules and writes the record; you approve each rule before it is applied. Nothing is recoded silently and the raw file is never edited, because the raw file is the evidence. The researcher workspace is where the rest of the project lives.
Does the pack remove outliers?
It resolves them, which is different. The first three questions are whether the value is physically possible for the instrument, whether it repeats on a conventional number, and what upstream file wrote numbers for missing. Winsorising before those checks buries a sentinel inside a plausible range.
Is this only for survey data?
No. The worked example is a workforce survey because the missing-code problem is sharpest there, and the structure is identical for administrative records, trial data, panel extracts or a scraped dataset. Any file with an eligibility criterion has a cascade, and any file with an absent value has denominators.
Write the record while the reasons still exist
Send the native data file, your eligibility criteria and your primary outcome. The register and the cascade come back with the arithmetic closed.
Edit with AI