The program stataspss.exe is a standalone converter of Stata's .do script setting labels of a tab-delimited dataset to an .sps script that can be executed by SPSS to import the same file. This .do file may use only a limited set of commands for labelling data plus must conform to additional limitations below.
Standalone here means that the converter is self-sufficient, specifically it does not require Stata, SPSS, or Stat/Transfer to perform conversion. However, SPSS is required to execute the resulting .sps script.
Tab-separated data file is a file which uses tabulation character (ASCII code 09) to separate fields within records. It is a popular information interchange format and is similar to CSV (comma-separated values). Most statistical packages and spreadsheet programs would allow export to this format.
For example, Open Office's Calc is producing tab-separated files compatible with this program. Select "Save As..." in the "File" menu, specify "Text CSV" format and set checkmark on "Edit filter settings". Then change the field separator to tabulation in the next dialog:
label define correct 1 "yes" 2 "no" label define alsocorrect 2 "no" 1 "yes"
`"this is `"not"' allowed"' `"this "is" allowed"' `"this is `also' allowed"' `"this 'should work' too"'
No installation is necessary. The application stataspss.exe is portable.
You need only the application file: download stataspss.exe
The most recent version is: 1.0.5367.19073 (compiled 2014.09.11)
stataspss.exe is a .NET program. It is designed to work in MS Windows, but should be able to run in Linux and Mac provided that Microsoft .NET Framework or it's alternative is installed on these machines. See Mono. The minimum required version of .NET is 2.0. If you have Windows Vista or newer, your system already has compatible version of .NET installed. For Windows XP Microsoft .NET Framework can be acquired from Microsoft's website for free.
This converter can be invoked from a command line with parameters to work in batch mode and be reused for various purposes.
Supply 3 arguments in the following order:
If the command line parameters are missing, the program will request them with the help of a dialog window shown here:
Once all the parameters are specified, click the Convert button to perform the conversion.
The following examples demonstrate how input files for the program may look like:
stataspss was written by Sergiy Radyakin.
To contact the author send email to: sradyakin/at/worldbank.org.
Using another program tab2dta one can create a native Stata dataset (binary *.dta file) from the same input files as used by this program.