Tuesday, February 10, 2015

Data Conversion between Software

Today we will learn how to convert data between software: Excel-STATA or SPSS-STATA or vice versa. We will use your Happiness Survey data to practice the conversion.

First of all, let's try converting from Excel -> Stata. Here are the steps: 

1. Open Stata 
2. Click on "File" 
3. Click on "Import"
4. Click on "Excel spreadsheet" 
5. Browse the Excel file you want to import
6. Check the "Import first row as variable names" 
7. OK. 

Here is the screenshot at Step 6:





































Then you will see your data in Stata that looks like this: 
























You can also Export back your Stata file to Excel file using "File -> Export -> Excel spreadsheet" 

Now let's look at how we can convert this Excel file into SPSS and then to Stata. Here are the steps:

1. Open SPSS software (I still use version 16, very old)
2. Under "File", click on "Open" then "Data"
3. Under "Files of type:" choose "Excel" 
4. Browse the name of your Excel data file, then select it
5. Check the box that says "Read variable names from the first row of data" 
6. Continue 

Here is the screenshot at Step 5: 

Now you have your data in SPSS (converted from Excel), and then you want to convert this SPSS file to Stata. Here are the steps: 

1. Under "File" click on "Save As" 
2. Under "Save as type:" choose "Stata" (anyone of them that says Stata) 
3. Under "File name:" type the name you want to save
4. Click on "Save" 

Here is the screenshot at Steps 2-4: