Skip to content

No account required

Start a project

The .dta file.

Stata's own format, and like SPSS it brings its codebook with it. The details that differ are the ones that catch people out.

What it actually is

A .dta file holds the data alongside variable labels, value label sets, and a notes field that researchers frequently use to record how a variable was constructed. For reproducing someone else's analysis, that notes field is often the most valuable thing in the file.

Stata distinguishes 27 missing values: a plain one and .a through .z, conventionally used to record *why* something is missing. That distinction is real information and is destroyed by any export that maps them all to blank.

The format has several versions, and older files use a different string encoding. Both are read here, but a file round-tripped through an old version may have lost long strings on the way.

At a glance

Carries
Variable labels, value label sets and dataset notes
Missing values
27 distinct kinds, plain and .a through .z
Dates
Days, months or quarters since 1 January 1960, per variable format
Versions
Format 113 through 121 in common circulation
Read here as
Direct, with labels kept so the codebook does not need re-typing
Status
Ready
Fidelity
Read directly
Largest file
250 MB

Variable and value labels are kept, so the codebook does not have to be re-typed.

Upload one

The analysis runs before there is anything to pay for. You see what it found, and the evidence behind it, first.

No account needed to start. You only pay when you like what you see.

What goes wrong, and what is done about it

01

Extended missing values collapsing into one

A dataset that carefully records .a for "refused" and .b for "not applicable" loses the distinction the moment it is exported to a format with one kind of blank, and with it the ability to tell a non-response from an inapplicable question.

Each extended missing value is kept as its own category and reported separately in the data dictionary rather than merged into a null count.

02

Dates that are days since 1960

Stata's date origin is 1 January 1960, and the unit varies by variable format — days, weeks, months, quarters or years. Read as plain numbers, a 2024 date becomes a small integer and every time-based analysis is silently nonsense.

The variable's declared format supplies the unit, so a monthly date variable is read as months rather than days.

Questions people ask

Do I need Stata to use this?

No. The .dta file is read directly, including its variable labels, value labels and notes, and nothing in the analysis depends on having the software. Exporting to CSV first is what loses the labels, so upload the original rather than a conversion of it.

Which Stata versions are readable?

All the formats in common circulation. Where a file is from an old enough version that long strings were truncated on the way in, that is reported rather than presented as complete.

Are the dataset notes used?

They are read and surfaced beside the data dictionary, because a note recording how a variable was derived is frequently the only place that information exists.

Jobs people do with this file

Related formats