BIOSTATISTICS AND DATA

How to Create a Research Data Dictionary

Guide · 1 min read · Last updated 2026-10-31

A data dictionary is a document that defines every variable in your dataset: its name, label, type, allowed values, units and how missing data are coded. Creating it before data collection prevents inconsistent entries and makes analysis and sharing far easier.

What to define for each variable

FieldExample
Variable nameage_years
LabelAge at admission
TypeInteger, continuous, categorical, date, text
Units or categoriesyears; 1 = female, 2 = male, 3 = other
Allowed range0 to 120
Missing codeblank = not recorded; 99 = not applicable (state which)
SourceAdmission record
Required?Yes/No
NotesHow derived or checked

How to create one

  1. List the variables needed for your objectives, exposures, outcomes and confounders.
  2. Choose short, consistent names without spaces.
  3. Define each variable precisely, including time windows (for example "30-day mortality from index admission").
  4. Specify codes for categories and for missing or not applicable.
  5. Add validation rules in your data collection tool (dropdowns, ranges).
  6. Pilot on a few records and revise.
  7. Keep a version history and lock the dictionary when data collection starts.

MRN's free data collection sheet includes a data dictionary sheet.

Illustrative example

Invented for teaching. Two data collectors code "diabetes" differently, one by chart diagnosis and the other by HbA1c above a threshold. A data dictionary that defines "diabetes = documented physician diagnosis in the problem list before admission" prevents inconsistent entries.

Common pitfalls

  • Changing definitions mid-study without recording it.
  • Using free text where a coded field would do.
  • Collecting identifiers that are not needed.

Key takeaways

  • Define every variable before collecting.
  • Use consistent codes and keep a record of changes.

References and further reading

  1. Hulley SB, Cummings SR, Browner WS, Grady D, Newman TB. Designing Clinical Research. 4th ed. Lippincott Williams & Wilkins; 2013. Link
  2. Sterne JAC, White IR, Carlin JB, et al. Multiple imputation for missing data in epidemiological and clinical research: potential and pitfalls. BMJ. 2009;338:b2393. doi:10.1136/bmj.b2393

Related reading

This page is general educational information about research methods. It is not medical, legal or regulatory advice; follow your institution's ethics board and your target journal's instructions.