Merge Data Add Cases
This function adds new cases (responses) to an existing SPSS data file; if you want to add new variables for the same cases then click here. Typically you will use this when you receive a new batch of data from a tracking study.
Both files being merged must be .sav (SPSS) files. A new .sav file containing the merged data will be produced, which you can import back into an existing project.
- The Current data file is the file you already had, and is usually part of an existing Q project.
- The Donor data file contains the new data.
Which File to Prefer?
Whenever Q finds differences between variables in the Current file and the Donor file it must choose which to prefer. For example, if Q1 is a text variable in the current file and a numeric in the donor then it must choose which type of variable to include in the merged file. You make this choice after you select the file to merge with.
Typically you should choose to resolve conflicts by preferring the Donor file (the new data). This will ensure that your Q project evolves to match any changes to the questions and options in the ongoing study.
There are some exceptions to this policy of preferring one file over the other:
- When merging data variables or currency variables with plain numeric variables, the output will contain a date or currency variable, regardless of which file you have opted to prefer.
- If value labels conflict, all distinct labels are included in the output (see also How To Merge Data Files In Different Languages).
Where two labels share the same numeric code, the labels from the non-preferred file will be renumbered.
How to Merge
Variables with the same name are automatically placed next to each other, which means they will be merged. You can match other variables by dragging the variables names together. You can also reorder the output file or separate variables by dragging them to new positions between existing variables.
If two variables next to each other differ then they will be coloured according to how closely they match:
|Yellow||Variables differ, but can probably be merged safely.|
|Red||Variables differ substantially and can probably not be merged.|
Use the Next and Previous buttons to help you find mismatched variables.
Use the Accept button if you are happy to merge the selected variable(s).
The variables in the output file will take their names and labels from the preferred input file, but you can change them by simply typing new names or labels into those columns.
- Hover over variable names to see their labels and types.
- If you need to move variables from one end of the file to another:
- Drag them to the Omit list,
- Scroll to where you want to move the variable, and
- Drag them from the Omit list to their new position.
- Q will always add a categorical variable to the file called mergesrc which identifies the source file for each record.
- If possible, it is generally preferable to obtain a single data file that has already been merged than to merge data files yourself. This is because:
- It can be difficult to manually construct a Date variable.
- It can be difficult when questionnaires have changed between waves.
- It requires the person doing it to have a good understanding of data (as ill-considered decisions can have large ramifications).
After finishing you should import the newly merged file into your existing Q project. Q will alert you to any differences and allow you to update your project.