How do I use a Stata data file in SPSS?

1. Reading a Stata file up to version 9 with SPSS

SPSS 15 and above currently supports Stata up to version 9. A Stata data file can be read in SPSS either via pull-down menu or via syntax using the get stata file command.

Using the pull-down menus select File -> Open -> Data... and then for Files of Type select the appropriate data file type; then select the file from the list and click Open. That is all to it. 

With SPSS syntax we can use the get stata file command to read in a Stata data file.

get stata file='C:\data\states.dta'.

2. Saving a Stata data file as a version 9 file

If you have a newer version of Stata such as Stata 10, you can save a data file as a version 9 file with the saveold command.  Here is an example.

use http://www.ats.ucla.edu/stat/stata/notes/hsb2, clear
(highschool and beyond (200 cases)) saveold "c:\data\hsb2old.dta" file c:\data\hsb2old.dta saved

3. Using Stat/Transfer

The most updated version of Stat/Transfer will recognize Stata version 10 data files and converting Stata data files to SPSS is fairly straightforward.

How to cite this page

Report an error on this page or leave a comment

The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.