[EpiData-list] Re: conversion from SPSS

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Wed Apr 3 10:24:51 CDT 2013


The simplest way to get your data into EpiData is to export it from SPSS to stata (file type .dta), although this may or may not work with your version of SPSS

You can import stata files directly into either classic EpiData or the new EpiData Manager. If you import to Manager, you will likely have to check each variable to be sure the format is what you want (e.g. number of decimals). You can check this easily using the codebook function in classic epidata or one of the reports in Manager.

Then fix the fields you need to. Note that in Manager, you can select a group of similar fields to change the size of field (e.g. decimals or string length). If SPSS exports value labels, these should come into Manager OK.

a caveat - I have never tried the SPSS to Stata part; I have done Stata to EpiData.

The more complex, but guaranteed to get your data in exactly as you want is to export SPSS to tab-delimited. You then have to create your own epidata database and use import the data. This can get really messy as Epidata expects the data to conform EXACTLY to your specifications. I have had a lot of grief trying to get things to match.

You can also import that tab-delimited data into Excel (there are lots of web sites that explain how to do this). Then format each column in Excel to match what you want (e.g. number of decimal places). Make sure the last column has no missing values. I suggest adding a field called XEND with the number one in each cell.
Make sure the first row has legal Epidata variable names.
Select the entire table, copy the data.
Then start up Epidata Analysis and give these commands:

read /cb
save mydata

You have just created mydata.rec with all of your data. In fact, if you can select and copy all of your data in SPSS along with the variable names, there is no need for Excel. However, I think you may only be able to copy the data. You need the first line to be variable names for this to work. I have done this a lot (to get from Excel data to SPSS and it work well as long as the data are clean. Analysis expects all of your variables to be consistent and not have special characters (quotes, commas) embedded in text fields.

Good luck!
Jamie

On 2013-04-03, at 9:42 AM, epidata-list at lists.umanitoba.ca wrote:

> My SPSS databank is composed of 703 columns, where the first 200 are
> baseline, and the other the follow-up. Each line is a case.
> Every time I want to input data, I open the databank, search for the case
> number and for the situation (e.g. 3rd month). After this, I fill in with
> the data.
> My baseline variables are different from the follow-up.
> At follow-up, variables are the same, exept the variable identification:
> height1m and weight1m ---> height3m and weight3m.



More information about the EpiData-list mailing list