THE FILE FIELD GUIDE
.dta

Stata Data

Data & Science

DTA is a Stata dataset with types, formats and labels alongside observations. Check writer/reader compatibility and interpret dates/missing values using their definitions rather than as ordinary numbers.

What it is used for
Statistical data with variable definitions and labels
What the file contains
Binary data
All sections, questions and sources

Content reviewed: · Editor:Kai

Opening steps

Choose your environment or purpose to see its steps.

Inspect a Stata dataset

Preserve current work before opening another dataset.

  1. Open a copy in Stata or a compatible reader.
  2. Inspect observation counts, storage types and labels.
  3. Compare representative dates, long strings and missing values.
Deliver to an older version

Check reader version and type limits.

  1. Identify the recipient’s Stata version.
  2. Save separately with the writer’s supported saveold workflow.
  3. Validate types, labels, values and counts in the older reader.
Export to CSV or another format

Distinguish labels from stored values.

  1. Choose required columns and label-export policy.
  2. Record date/missing-value handling and export separately.
  3. Reopen and compare identifiers, strings and rows.

Menu labels and support vary by app, OS and version. Preserve the original before making changes.

Troubleshooting by symptom

  • New format unsupported: check writer/reader versions.
  • Numeric-looking dates: inspect date/time formats and units.
  • Changed missing values: compare ordinary/extended missing representations.
  • Old Stata rejects it: inspect format-version support.
  • Dates become numbers: inspect storage versus display formats.
  • Missing values change: inspect destination missing-value semantics.

DTA → CSV / compatible dataset version

  1. Record selected variables, labels, date/time and missing-value definitions.
  2. Use supported export/version-save workflows and compare counts/values.
  3. Reopen in the recipient’s version and compare label/missing-value meaning.

CSV loses equivalent labels/missing-value definitions; older versions may have type/length constraints.

Inspect values, display formats and labels

Displayed labels/dates can differ from stored codes; inspect both.

Source for these steps:StataCorp · use — Load Stata dataset / StataCorp · save — Save Stata dataset / IBM · Saving data: Data file types

Reopen older-format exports at the destination

Check saveold support in the installed release; identical suffixes can contain different format versions.

Compare counts, types, labels and missing-value distinctions and retain the current source.

Source for these steps:StataCorp · use — Load Stata dataset / StataCorp · save — Save Stata dataset / IBM · Saving data: Data file types

Related-format differences

Related-format differences
FormatMain roleWhat to check
Current DTAStata datasetVersion/labels
DTA via saveoldOlder-version exportType limits
CSVText tableDates/missing/labels

Handling and security

Review respondent/ID disclosure, retain originals/code and avoid overwriting current analysis.

Questions and answers

Can a spreadsheet open it directly?

Use compatible tools or export the needed subset.

Does it contain the analysis code?

Keep analysis code/logs separately.

Does CSV convey the full meaning?

Include labels, units and missing-value documentation.

Can I rename DTA to CSV?

Export through a supported reader and preserve metadata.

Does saveold guarantee complete preservation?

Older formats have limits; validate types, long strings and required attributes.

Format facts: name, steward and MIME type
Formal name
Stata dataset
Steward / specification
StataCorp
MIME type
Depends on the producer or server; an extension alone does not establish a MIME type.

Primary and official sources

  • Software documentationuse — Load Stata dataset

    Documents loading DTA and selecting variables/observations.

    StataCorp · Link checked:
  • Official documentationsave — Save Stata dataset

    saveold and output-version selection.

    StataCorp · Link checked:
  • Software documentationSaving data: Data file types

    Reference for SPSS SAV/export formats, not game-save specifications.

    IBM · Link checked: