Key takeaways
- Clean survey data in a fixed order: duplicates first, then speeders, straight-liners and contradictions, open-ends, and partials last, logging every rule as you go.
- Remove respondents only for objective, rule-based failures; flag judgment calls and run key cross-tabs both with and without flagged records.
- Set your partial-response completion threshold before fieldwork closes and use dropout points as diagnostics for screener or questionnaire fatigue.
- Clean open-ends in three passes (non-answers, deduplication, coding) so your codeframe never absorbs gibberish or copy-paste spam.
- Keep raw, flagged, and analysis-ready files as separate versions with a cleaning log of rule IDs so any exclusion is reproducible.
Cleaning survey data means applying a fixed sequence of documented decisions: screen out duplicates and bots, flag speeders and straight-liners, rule on partial responses, then recode open-ends, recording every exclusion rule as you go. This article gives you that decision tree plus a documentation template, so each removal you defend in a cross-tab has a written audit trail behind it.
What counts as ‘dirty’ survey data and which problems should you fix first?
Dirty data is not one problem. It arrives in six forms: duplicate respondents, speeders, straight-liners, contradictory answers, junk open-ends, and partials. Each threatens your cross-tabs differently, and each differs in how reliably you can detect it. Fixing them in the wrong order wastes effort or, worse, deletes evidence you needed for a later decision.
The five problem categories, ranked by risk
| Problem | Threat to results | Detection difficulty |
|---|---|---|
| Contradictory answers | High | Moderate (needs consistency checks in the questionnaire) |
| Straight-liners | High | Moderate; speed thresholds alone miss many cases (methodology review) |
| Speeders | Medium | Low (response-time flags) |
| Duplicates | Medium | Low (respondent fingerprinting, near-duplicate detection) |
| Junk open-ends | Medium | Low (manual or keyword scan) |
| Partials | Context-dependent | Low, but treatment choices bias the sample |
Why detection order matters more than detection method
Remove duplicates first, because a duplicate that straight-lines would otherwise inflate two flags at once. Then treat speeders, then straight-liners and contradictions, then open-ends, then partials. Sequencing this way means every exclusion is applied to a file whose prior exclusions are already logged, which is what makes the audit trail defensible.
When should you remove a respondent versus flag them for sensitivity analysis?
The remove-vs-flag decision rule
Remove a respondent only when an objective, rule-based failure is documented: a duplicate respondent fingerprint, a failed screener, or a completion time that makes the questionnaire physically impossible to answer. These failures are defensible in front of a client because the rule fires identically for every record in fieldwork.
Flag everything else. Marginal speeding, mild straight-lining, and vague open-ends are judgment calls, and deleting judgment calls silently is how sample bias enters a dataset. Keep flagged records in the file, run your cross-tabs both ways (flagged-in and flagged-out), and report the difference. If key results hold across both cuts, your findings survive scrutiny; if they shift, you need to know before your stakeholder does.
Copy-ready flag documentation template
For every flag, log one row per respondent with these fields:
- Respondent ID and flag type (speeder, straight-liner, near-duplicate, other)
- Rule that fired, with its threshold (e.g., “median completion time × 0.4”)
- Action taken: removed or flagged
- Timestamp and analyst initials
This gives you an audit trail where every cleaning decision is reproducible, and lets you re-run the analysis under different flag thresholds without touching raw data.
How do you handle partial responses and dropouts without biasing your sample?
Dropout point as a diagnostic, not just a loss
Before deleting a single partial, check where respondents exit. Dropouts clustering at the screener mean your quota logic or screening questions are over-terminating; dropouts mid-questionnaire often point to a fatiguing block, a sensitive topic, or a branching error. The exit question is fieldwork intelligence, so log it alongside your completion counts rather than treating partials as anonymous losses. This also tells you whether the dropouts resemble your completers on observable attributes, which is the core check for nonresponse bias per AAPOR’s guidance on nonresponse and response rates.
Setting your completion threshold in advance
Decide before fieldwork closes whether a partial counts: for example, “answered through Q12, including all key demographics.” Write the rule down, apply it to every partial identically, and record it in your cleaning log. Then document the outcome explicitly: partials excluded, partials included with a weighting adjustment, or partials retained only for a sensitivity check. If excluding them shifts your cross-tabs materially, that belongs in the report, not buried in the file.
How do you detect and treat straight-lining, speeding, and patterned responses?
Speeding thresholds you can defend
Set your speeding threshold per questionnaire, not globally. A common defensible rule is flagging anyone who completes in under half the median completion time, or under a fixed floor (for example, one-third of the median for grids). Publish the threshold in your fieldwork plan before launch so it reads as a pre-registered rule, not a post-hoc judgment call.
Straight-line and pattern detection rules
For each matrix item, compute the longest run of identical answers and flag respondents whose runs exceed a set share of grid items, often 80% or more. Also test for diagonal patterns (answer position shifting consistently across rows) and repeating cycles like 1-2-3-4-5-1-2-3. Straight-lining is not always careless: a genuine uniform opinion produces the same signature. Check whether the straight-liner also failed an attention check or sped through; a straight-line run combined with either is far stronger evidence of bad data than the run alone.
Treatment options and their reporting implications
For every flag you have three treatments: exclude, flag, or run the analysis both ways. Exclusion is cleanest for reporting but shrinks your base and invites stakeholder questions about why n changed. Flagging keeps the respondent in the file while marking them for sensitivity analysis, which is usually the better default because it preserves your audit trail. The defensible move is to run your key cross-tabs with and without flagged respondents and report both if the numbers move materially. If they do not move, you can report the full sample and note the exclusions in your methods section, which is far easier to defend to a client than a silent deletion. Whatever you choose, record the rule, the count affected, and the treatment in the same cleaning log you use for partial responses.
How should you clean open-ended survey answers before coding them?
Clean open-ends in a fixed sequence: strip non-answers first, deduplicate next, then code the surviving text. Coding before cleaning means your codeframe absorbs gibberish and copy-paste spam, inflating categories and skewing cross-tabs.
Three-pass cleaning for open-ends
Pass one: remove non-answers. Drop blanks, single characters, and keyboard mashing (“asdfgh”). Keep a rule for ambiguous entries like “n/a” or “no” in a comment field: treat them as non-answers unless the question invites a negative reply.
Pass two: deduplicate. Near-duplicate detection catches respondents pasting the same sentence across multiple open-ends or identical text from multiple respondents. Flag exact and near matches, then review before removal.
Pass three: code the cleaned set. Apply your codeframe only after passes one and two, so codes reflect genuine verbatims. Platforms including Qualtrics and Alchemer offer text analysis and data quality features that can support this workflow (Qualtrics support documentation).
Recode documentation template
Log every recode decision in a spreadsheet alongside the dataset: respondent ID, question, original text, action taken (removed, merged, recoded), rule applied, and analyst initials. This keeps your audit trail intact and lets a stakeholder reproduce exactly which verbatims fed each cross-tab.
How do you document every cleaning decision so your analysis is reproducible?
Reproducibility comes from two artifacts: a cleaning log that records every rule you applied, and a versioned dataset convention that keeps raw, flagged, and analysis-ready files separate. If a client challenges a cross-tab six weeks later, you should be able to point to a rule ID, not a memory.
The cleaning log template
Keep one spreadsheet or CSV alongside your dataset with five columns: rule ID, trigger, action, respondent count, and timestamp. A row might read: R04 | completion time < 40% of median | flag, do not remove | 37 | 2025-01-14. Every exclusion, recode, or flag gets its own row, including rules you considered and rejected. The rejected rules matter most when defending fieldwork decisions later.
Versioning raw, flagged, and analysis-ready files
Never clean in place. Keep three immutable files: raw_v1 exactly as fielded, flagged_v1 with quality flags appended but no rows altered, and analysis-ready_v2 with exclusions applied. Each new cleaning pass increments the version number and references the log. Anyone can diff flagged_v1 against analysis-ready_v2 and see precisely which respondents dropped and why.
Platform-level vs post-hoc quality controls
Post-hoc cleaning catches what slips through; platform-level controls prevent it. Respondent fingerprinting and near-duplicate detection applied during fieldwork mean fewer judgment calls after close, and flags arrive pre-attached to each case. The honest caveat: platform checks reduce post-hoc work but never eliminate it, so your log and versioning convention still carry the audit trail either way.
What cleaning steps change your results versus those that only change your file?
Result-changing vs file-hygiene steps
Result-changing steps alter the numbers in your cross-tabs: removing speeders or straight-liners, dropping partials past a completion threshold, recoding open-ends, or reweighting quotas. File-hygiene steps change nothing a stakeholder sees: renaming variables, dropping test records you never counted, reordering columns, or standardizing labels. Log them in the same audit trail, but report them separately so nobody assumes a topline moved when it did not.
A practical test: if re-running the cleaning step produces a different n or a different percentage, it belongs in the results-changing list. Everything else is housekeeping.
Reporting exclusions in your topline
Every result-changing exclusion needs a count and a reason in the topline: “14 speeders removed per sub-median-time rule, n 486 to 472.” Flag-then-sensitize cases get a second line showing the flagged run alongside the clean run. If your platform prices quality controls like respondent fingerprinting into tiers such as Plus or Business on MRSurvey’s pricing page, note which checks ran in-field versus post-hoc, because in-field screening changes who was recruited, not just who was counted.
Which platform quality controls catch bad data before it reaches your file?
Platform-level checks compared on the same criteria
Judge every platform on three questions: does it fingerprint respondents, does it detect near-duplicates, and does it flag speeders and straight-liners in the field rather than after download? MRSurvey builds all three checks into the platform itself, so respondent fingerprinting and quality flags are applied during fieldwork, not bolted on afterward. SurveyMonkey, Qualtrics, QuestionPro, and Alchemer offer quality features at various tiers, and Pollfish approaches sample quality from the panel side. The honest test is whether the checks run by default on your plan or require configuration and add-ons.
What no platform catches for you
No platform can decide for you whether a flagged respondent stays in the sample or moves to a sensitivity analysis. Straight-liners who answer plausibly, partial responses, and open-ends needing recoding all still require the documented cleaning sequence from the earlier sections. Platform flags reduce the volume of bad data reaching your file; they do not replace the audit trail you build when you clean it.
FAQ
Should I delete speeders or just weight them down?
Flag them first, then run key cross-tabs both with and without them. Clear deletion is defensible only when completion time makes answering physically impossible. Weighting speeders down keeps them in the sample but assumes their answers are merely low-quality rather than invalid, which is a harder claim to defend. Log whichever treatment you choose.
How much data cleaning is too much before results become unreliable?
You have gone too far when exclusions stop following pre-set rules and start following outcomes. If removing flagged respondents shifts your toplines materially, that shift is a finding to report, not a reason to keep cutting. A practical ceiling: every removal needs a written rule that fires identically for every record, and rejected rules logged too.
Can I clean survey data in Excel or do I need a tool?
Excel handles the full sequence for modest samples: deduplication, completion-time flags, straight-line run counts, and a cleaning log spreadsheet. You need a tool when near-duplicate detection, respondent fingerprinting, or in-field flagging matter, since those run during fieldwork rather than after download. Whatever you use, keep raw, flagged, and analysis-ready files as separate versions.
What percentage of survey responses are typically removed during cleaning?
There is no universal figure, and quoting one invites false confidence. Removals depend on your sample source, screener length, and thresholds, so a defensible study reports its own counts: for example, “14 speeders removed per sub-median-time rule, n 486 to 472.” Track removals per rule in your cleaning log rather than benchmarking against an industry average.
Do I clean data before or after weighting?
Clean first, weight second. Weighting adjusts the sample you have decided to keep; applying weights to records you later remove means recalculating everything and muddying your audit trail. Decide partial-response treatment and apply exclusions before weighting, then document whether partials were excluded, weighted in, or retained only for a sensitivity check.