The tools for Merging Data Files by adding cases assume that the variable names in the files are consistent. For example, they assume that if age is stored in q1 in one file, the other file will use the exact same Variable Name. Where this is not the case, there are a number of strategies that can be used.
- A professional user license
- Files to be merged must be stored on the Displayr Cloud Drive.
- FIles to be merged must be .sav files
Liaise with the data file provider
Often when data files do not match, it is a result of an error by the person who created the data file. It is often useful to get them to fix the problem, as in addition to solving the problem with the variable names mismatching, they may fix other problems that you have yet to discover at the same time.
Using the GUI
- Select Anything > Data > Data Set > Combine > By Variable.
- In Inputs > Data sets, type the name of the first file on the Cloud Drive in the Data set 1 box.
- In Inputs > Data sets, type the name of the second file on the Cloud Drive in the Data set 2 box.
- Type the name of the merged data set in the Combined data set name box. By default, it will be called Combined data set.sav.
Copying and renaming
The basic idea is to rename all the variables in one file to match those in the other.
- Import the data file that contains the variables that you wish to rename.
- In the Data Sets tree, select all the variables that you wish to rename.
- Right-click and select Duplicate.
- Hide the original variables in the data file.
- Export as an SPSS data file.
- Merge the files.