SAVE10 - export Stata 10 datasets from Stata 9-13

by Sergiy Radyakin


This program exports the data from any version of Stata (9.2 and larger) in a stable format of Stata 10, which is known to many other statistical packages. Long strings that were added in Stata 13 format can not be accommodated in this format and are truncated to an appropriate length.

If you need to transfer data to SPSS, another freely available Stata command savespss may be more useful, as it retains longer strings, converts dates and produces SPSS binary file directly.

If you need to read datasets saved in Statas newer then your own, a family of commands use10, use12, and use13 will help. Read more about Stata-to-Stata data transfer.

If you are familiar with technical documentation of StataCorp, the file produced by save10 corresponds to Stata dataset specification 114.

Features

save10 attempts to preserve all features that are present in the data, including labels, missing values, etc. as long as they can be accommodated by the format of Stata 10.

The following is the list of supported features:

(*) for datasets loaded to Stata, saved timestamp is used if the dataset was not modified; for new and modified datasets the current date and time are used

(**) truncating long strings not supported by Stata 10 data format may violate the sort order. save10 correctly detects this situation, truncates the sort order, and gives a proper warning. Sorting on such long strings is not a good idea anyway!

Installation

This is a beta! Be careful!

Stata 9.2 or newer is required. If you are using Stata 9.0 or 9.1 you can update to 9.2 for free with an official update from StataCorp.

net from http://www.radyakin.org/transfer/save10/beta

Syntax

  save10 "filename"
  save10 "filename", replace

Equivalent forms are saveas10 and saveto10.

If option replace the program replaces the specified file.

save10 does not imply file extension and requires quotes around the file name exactly as shown.

Mata version is available:

mata save10("filename")

Be aware that if you are using Stata 9.2 the dataset will be saved in the format that Stata 9.2 can't read back in by itself! To read the data back in, you can use the use10 package.

Author

save10 was written by Sergiy Radyakin. The program is supported via StataList.