How to prepare research data for statistical analysis
A practical checklist for organizing rows, variables, missing values, codebooks and sensitive information before a thesis or dissertation analysis.
Start with the unit of observation
Before changing any cells, write down what one row means. Is it one person, one visit, one classroom or one response to one question? If a person appears at several time points, preserve an identifier that links those records without exposing their name. Repeated rows from one person are not independent observations; the analysis needs to know about that structure.
Keep a read-only copy of the original file. Make cleaning decisions in a working copy or a reproducible script, and record each change. A file that merely looks tidy can still misrepresent the study if records, categories or dates were altered without an explanation.
Make a small codebook
For every variable used in the analysis, record its name, the question or measure it represents, units, valid values, category labels, missing-value codes and any transformation. Include the meaning of a zero: zero hours studied can be a valid observation, while a blank cell or a reserved code may mean “not answered.” The ICPSR data-submission guidance emphasizes variable labels, value labels and codebooks for interpreting data, and the UK Data Service guidance calls for documented missing-value codes and a data dictionary.
If you calculate a scale score, state which items contribute, whether some are reverse coded, how missing items are handled and what a higher score means. Keep the original item responses alongside the derived score when permitted. A codebook is useful even when the analyst already knows the questionnaire: it lets someone else check the same assumptions.
A preparation toolkit for your own file
Download the complete preparation toolkit ZIP, or choose an individual file:
- Blank codebook CSV template: fill one row per variable using your own study definitions.
- Printable preparation checklist: review structure, coding, scores and decision records.
- Instructions and column definitions.
Use these files independently; they do not upload data to Statikali. The worked example below shows a completed codebook, while the toolkit template is blank.
Check the structure before the statistics
- Confirm that column names are unique and rows do not contain repeated headers or merged cells.
- Check whether numeric columns contain text such as “N/A” or units pasted into cells.
- Compare category codes against the questionnaire, including skipped questions and “prefer not to answer.”
- Look for duplicate records, impossible dates and values outside the instrument's range. Investigate them; do not delete them automatically.
- State whether participants were assigned to groups, measured repeatedly, sampled in clusters or weighted.
- Keep a short log of exclusions and recodes, with the reason and the number of rows affected.
Follow the input files through to analysis
In the basic research example, one row in the original data file represents one student. The questionnaire, study description and original codebook explain what those responses mean.
| Variables | Meaning and coding |
|---|---|
| d1 | Ordered study-year categories: first, second, third |
| q1_1 to q1_5 | Five academic self-efficacy items, scored 1–5 |
| q2_1 to q2_5 | Five learning-persistence items, scored 1–5 |
| academic_self_efficacy | Mean of the five q1 items, added during preparation |
| learning_persistence | Mean of the five q2 items, added during preparation |
The first row has self-efficacy responses of 3, 2, 3, 4, 3: their mean is 3.00. In the prepared analysis data, the original items remain alongside the two calculated scores. This study has no reverse-scored items or missing responses. For your questionnaire, document those rules before calculating scores; the same averaging rule cannot be assumed for every instrument.
Share only what is needed
Remove direct identifiers that the analysis does not require. Check free-text responses, filenames and sheet names as well as the main data table. If the dataset contains sensitive or institutionally restricted information, ask about suitability before uploading it. Replacing names with codes does not automatically make a dataset anonymous.
Before you submit, gather the research question, the original questionnaire, the codebook, the cleaned working file and the change log. A statistical consultation can help identify what is needed next, whether collection is planned or complete. Consultation is not yet open; check service availability.
See the complete research examples
Follow the research questions through the input files, analysis plan and outputs. Each example includes the consultation report, itemized illustrative price and generated files.
Basic example · undergraduate level
Academic self efficacy and learning persistence
A questionnaire study with two scales and one association hypothesis: reliability, descriptive statistics and a Pearson correlation.
Advanced example
Job autonomy, supervisor support and work engagement
A three-scale study with factor analysis, reliability, three hypotheses including regression, and an additional background-adjusted model.