Transfer of data between different Stata versions
This page is maintained by
Sergiy Radyakin and describes transfer of data files between
various versions of a popular statistical package
Stata.
If you are looking for information on transfer of data
between different statistical packages, other pages might
be more relevant. See e.g.
savespss for transfer from Stata to SPSS.
Using the quick-reference table below you can quickly
identify whether you need anything to load a particular
dataset in your specific Stata.
Here are a few facts:
- The concept of a 'Dataset format' is different from the
concept of 'Stata version'. When most users talk about
"Stata-13 datasets" they are really talking about
"Stata datasets formatted according to specification 117".
- The file format of Stata datasets is open. Which means the
specifications are available to developers of other software.
This differs Stata from other statistical packages that rely on
closed and secret proprietary file formats, classical example
being SAS.
- Not all of the Stata datasets specifications, however, are
immediately available. Web-callable specifications are
117,
115,
114, and
113,
dating all the way back to Stata 8. There are
reasons to believe that earlier specifications can be made
available upon request by StataCorp.
- Stata can read datasets saved with any earlier version of Stata.
- The reverse is not true: Datasets can't be saved in
arbitrary older formats by newer Statas.
- 'Downgrading' of a dataset using an officially recommended
(by StataCorp) route is an iterative (cascading) process,
requiring intermediate versions of Stata. The process is
described in detail in the
FAQ
and is implemented with the official
-saveold
- command of Stata and it's outdated cousin save,old.
- Adding to overall confusion, supported file format may depend
on particuar version detail of Stata (such as 11.0 or 11.1).
Reportedly,
Stata 11 was updated to support specification 115, which
it could not support at the time it was released, since Stata 12
in which it was introduced didn't exist yet.
- Saving to an older format usually implies some sacrifices,
which depend on the dataset, hence it is necessarily a
user-controlled process. Just recall, for example, that
Stata 1.0 didn't have string variables at all! Nor did it have
byte-wide numeric variables either.
There are alternatives to use10, use12, and use13 commands.
- A commercial alternative is a
Stat/Transfer package, which is of excellent quality and updated
regularly. When available, it is usually the best alternative.
- A popular commercial DBMS/Copy package was discontinued a while ago
and the last available version, while
reportedly still being in use in organizations having permanent and/or
site-wide licenses, by now has hopelessly lagged behind and can only be
recommended for converting data between archaic data types, and is not
applicable to this discussion.
- A free alternative is R, though it may not support all the
versions of Stata datasets.
The implementation of the
use10,
use12, and
use13
commands is completely independent from the algorithms in the above alternatives.