Research and Statistical Support

UIT | ACUS | Help Desk | Training | About Us | Publications | RSS Home

Return to the SPSS Short Course

MODULE 8

Use the Merge function to add variables

Task: Use the Merge function to add variables from 'ex3r2.sav' to ‘ex3reverse.sav'.

Start off by importing the ex3reverse.sav into the Data Editor window of PASW / SPSS (from this point forward referred to as simply SPSS). You will also need ex3r2.sav; so download and save it to your desktop or some other location (but do not open it; only open ex3reverse.sav).

First, go to Data, Merge Files, Add Variables...

You should now see the familiar Add Variables dialog. Click the "Browse..." button and select the ex3r2.sav file, then click the "Open" button; then click the "Continue" button.

Now you should see the following Add Variables from... dialog box. Next, click on the "Match cases on key variables in sorted files" box. Then click the circle beside "Active dataset is keyed table". Then highlight the variable code(*) located in the "New Active Dataset:" list (upper right). Then click the bottom arrow to move that variable directly to the "Key Variables:" box on the lower right.

You should see the following: Notice that "code(+)" has disappeared from the "Excluded Variables:" box.

You can now click the "OK" button. You will be prompted with a warning:

The warning simply reminds you that you should have sorted both data files by the "Key Variables:" variable prior to beginning the process of merging the two files. This highlights the importance of always having a code variable to identify cases (just in case you collect a second wave of data with the same participants; such as in a longitudinal study). Click "OK" to complete the merging process.

You should now see that all three new variables have been added to the original ex3reverse.sav data file.

Return to the SPSS Short Course

UNT home page | Search UNT | UNT news | UNT events

Contact Information

Jon Starkweather, PhD

Jonathan.Starkweather@unt.edu

940-565-4066

Richard Herrington, PhD

Richard.Herrington@unt.edu

940-565-2140

Last updated: 01/21/14 by Jon Starkweather.

UIT | ACUS | Help Desk | Training | About Us | Publications | RSS Home