How to Convert String Variables With Non-Numeric Values to Numeric Variables in Stata
How to Convert SAS Datasets to Stata Format
Stat/Transfer is my go-to software when I need to convert data from SAS or SPSS to Stata.
I have to convert data from SAS (or SPSS) to Stata from time to time. There are a few different ways to achieve the same result. However, one of the easiest methods is with Stat/Transfer.
The steps required to convert data between statistical packages are intuitive with Stat/Transfer.
Below is a screenshot of the user interface of Stat/Transfer Version 9 on Windows XP Professional via VirtualBox:
In the default (‘Transfer’) tab, you merely have to enter values in four fields:
1. Input File Type
Choose the format of the original data file from the drop-down menu. In my case, it’s usually SAS or SPSS.
2. File Specification
Press the ‘Browse’ button and navigate to the location of the original data file.
3. Output File Type
Select the format you want to convert the data file to from the drop-down menu. In my case, it will almost certainly be Stata (Version 10).
4. File Specification
Press the ‘Browse’ button and navigate to the directory where you want to store the newly created data file.
The final step is to press the ‘Transfer’ button. That’s it.
If you need to convert another file, press the ‘Reset’ button to clear the fields.
As you can see in the screenshot above, other tabs on the top navigation bar provide various options. Other than changing the version of Stata (to Version 10 in my case), the default options suffice to get the job done.
Stat/Transfer’s simple appearance belies its powerful features. I have used the program to convert hundreds of megabytes of data, usually without a single issue.