Presentation is loading. Please wait.

Presentation is loading. Please wait.

Session 15 Merging Data in SPSS

Similar presentations


Presentation on theme: "Session 15 Merging Data in SPSS"— Presentation transcript:

1 Session 15 Merging Data in SPSS
Survey Training Pack Session 15 Merging Data in SPSS

2 Side-to-Side Merge Merge Section 0 data and Section 1 data
Both from same survey and at Household Level Each dataset has one record per HH Linked by primary key – combination of SITEID, BLOCKID, VILLID, HHID

3 Open Section 0 data File -> Open -> Data – select file
Paste to save syntax

4 Sort Cases Files should be sorted before merge Data -> Sort Cases
Sort by primary key – variables in correct order

5 Section 1 data Open and sort in the same way
Each open file has unique dataset name (for SPSS reference – e.g. dataset1, dataset2, etc.) Commands run on “Active” dataset DATASET ACTIVATE DataSet2

6 Merge Procedure Move to Section0 dataset
Data -> Merge Files -> Add Variables

7 Match cases on key variable

8 Syntax for Merge /FILE = * - refers to active dataset

9 Table Lookup Merge Data files with one-to-many relationship
Example – household level data (Section 1) with fertiliser level data Each household can have one or more types of fertiliser (or none)

10 Fertiliser Level Data Highlighted cases both for same household

11 Table Lookup Merge Data -> Merge Files -> Add Variables
Select File to merge Move key identifiers to Key Variables box

12 Keyed table “Keyed table” is on “one” side of “one-to-many” relationship

13 Syntax for Table lookup
/TABLE – defines the keyed table

14 Summary Always merge by key identifier
Sort files by key identifier before merge “keyed table” at the “one” side of a one-to-many relationship “many” can also be “none” – e.g. household not using fertiliser Careful interpretation needed – might need to aggregate


Download ppt "Session 15 Merging Data in SPSS"

Similar presentations


Ads by Google