Quantitative Research

Research Data Dictionary: Template and Example

Document variable meanings, units, codes, missing values and derivations so your dataset can be interpreted and analysed consistently.

Published 22 October 2026Updated 22 October 20263 min read
Quantitative Analysis
An indexed variable dictionary linking short names and codes to fuller definitions.
Image: Methods Bench
Direct answer

Six months after data collection, will someone know whether visit2 means a second appointment, a second interview or attendance at follow-up? A data dictionary should answer that question without requiring the person who created the variable to be available.

A research data dictionary describes the contents and conventions of a dataset. It connects short variable names to their meaning, source, coding and derivation. It is part of the analysis infrastructure, not an optional appendix added when sharing becomes unavoidable.

In this guide

Document more than labels

At minimum, record the variable name, description, data type, units or categories, allowed values, missing-value conventions and source question. For derived variables, include the rule and version of the code that generated them.

The UK Data Service. Prepare your data collection for deposit. highlights documentation needed for usable research data. A project-level dictionary can support that goal from the beginning, even when the dataset will remain restricted.

Use an explicit example

For a fictional appointment study:

VariableMeaningCoding or unitsImportant note
participant_idPseudonymous participant keyStringNot a phone number or name
scheduled_dateDate of planned appointmentISO dateDistinguish from actual attendance date
attended_7dAttendance within seven days of scheduled date0 = no; 1 = yesDerived only where outcome is ascertainable
travel_minutesReported one-way journey durationMinutesDo not combine with round-trip duration
outcome_missing_reasonReason attendance is unknownDefined categoriesSeparate from observed non-attendance

The dictionary should explain boundary decisions too. Does “within seven days” include the scheduled day? How are early visits handled? The answer belongs in the documented derivation, not in an analyst’s memory.

Distinguish missing from zero

Zero travel cost can be a real value. A blank cost may mean not recorded. “Not applicable” may mean the person did not make the journey. Those states should not collapse into the same number.

If special numeric codes are used during collection, document them and convert or handle them appropriately in analysis. Otherwise, a code such as 999 can silently become an extreme but apparently valid observation.

Where practical, keep a separate field for the reason information is missing. Do not infer the reason from the value alone.

Record how derived variables are made

A label such as “knowledge score” is insufficient. List contributing items, reverse coding, weighting, permissible missing items and the score range. Link the derivation to executable code or a fully specified rule.

If the scoring rule changes, version it and regenerate the variable from preserved source data. Do not overwrite the old definition without documenting which analyses used it.

Keep the dictionary synchronised

Assign responsibility for updates. Review it after questionnaire changes, import transformations and analysis decisions. A dictionary that describes last month’s dataset can be more misleading than no dictionary because it looks authoritative.

Use automated checks where feasible to compare variable names, allowed categories and types with the actual dataset. Investigate mismatches; do not simply amend the dictionary to legitimise an unexpected value.

Test it with an unfamiliar reader

Give a colleague the dictionary and a small, appropriately de-identified or synthetic data extract. Ask them to calculate one basic measure and explain its denominator. If they need several clarifications, add those answers to the documentation.

Copy this data-dictionary header

NAME: attended_7d RULE: Scheduled day through day seven, inclusive VALUES: 1 = attended; 0 = known not to attend UNKNOWN: Missing outcome + documented reason

An explicit definition prevents a plausible but wrong calculation.

Use one row per variable; keep longer derivation code in a versioned script referenced by the dictionary.

variable_name | label | source_item | data_type | units | allowed_values | missing_codes | derivation_rule | code_version | notes

For attended_7d, an explicit fictional rule could count attendance from the scheduled date through seven calendar days afterwards, inclusive. A known visit in that window is coded 1. Code 0 only when the ascertainment procedure establishes no visit in the window; otherwise retain a missing outcome and its reason. Define handling of early visits and date-time boundaries for the actual study before deriving the variable.

Good documentation reduces repeated questions and prevents avoidable analytical disagreements. It also makes future collaboration less dependent on whoever remembers what final_score_new2 was supposed to mean. Continue with the statistics and results collection once the data structure is explicit.

Continue your research

Three useful next steps for this topic.

Research notes, once a week

Practical research guidance, useful tools and funding opportunities in your inbox.

You can unsubscribe at any time.

Written by Methods Bench.