spss2stata, version 2.1 (03-JUL-2009) Based on SPSS version 15.0 and newer spss2stata creates Stata syntax to convert an SPSS data file (.sav) into a Stata/SE data file (.dta). The script - will ask for an SPSS data file to be converted, - will convert the SPSS file into a Version 8 Stata file (.dt8) (saved into the same directory as the SPSS file) - will write into a new syntax window the SPSS-syntax used to convert the SPSS-file, - will write into a new syntax window the Stata syntax needed to read the Stata file and to define the value labels and missing values according to the variable definitions of the SPSS-file. Since version 2.0 the script supports variable names longer than 8 characters. Nevertheless, you may find the Stata ado -usespss- useful, too. It can be installed from within Stata by -ssc install usespss-. However, in contrast to this script and similar to StatTransfer -usespss- does not convert the labels of missing values. If the script has finished the user has to save the SPSS syntax (as a .sps-file) and the Stata syntax (as a .do-file) by himself. Do not save the SPSS data file if asked by SPSS because some variable names might have been changed by the script (as indicated in the SPSS-syntax created)! Since version 2.1 of spss2stata the Stata missing values are created starting with the highest missing SPSS value. The following table shows how in the current and previous versions of spss2stata SPSS missing values are (re)coded into Stata missing values: SPSS | former versions | since version 2.1 | change since 2.1 -----|-----------------|-------------------|----------------- 9999 | .c | .a | yes 9998 | .b | .b | no 9997 | .a | .c | yes 9996 | .d | .d | no 9995 | .e | .e | no WARNING: Close or save your SPSS data file before running the script because it will not save a current data file and will close it without a warning! -------------------------------------------------------------- To convert an SPSS data file: 1. Start SPSS, open and run the script "spss2stata.sbs" 2. Save SPSS syntax (for your documentation) 3. Save DO-file 4. Run DO-file with Stata