27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Duplicate Cases<br />

MATCH FILES 909<br />

Duplicate cases are those with the same values for the key variables named on the BY<br />

subcommand.<br />

• Duplicate cases are permitted in any input files except table files.<br />

• When there is no table file, the first duplicate case in each file is matched with the first<br />

matching case (if any) from the other files; the second duplicate case is matched with a<br />

second matching duplicate, if any; and so on. (In effect, a parallel match is performed<br />

within groups of duplicate cases.) Unmatched cases are assigned system-missing values<br />

(for numeric variables) or blanks (for string variables) for variables from files that do not<br />

contain a match.<br />

• The program displays a warning if it encounters duplicate keys in one or more of the files<br />

being matched.<br />

TABLE Subcommand<br />

TABLE specifies a table lookup (or keyed table) file. A lookup file contributes variables but<br />

not cases to the new working file. Variables from the table file are added to all cases from<br />

other files that have matching values for the key variables. FILE specifies the files that supply<br />

the cases.<br />

• A separate TABLE subcommand must be used to specify each lookup file, and a separate<br />

FILE subcommand must be used to specify each case file.<br />

• The BY subcommand is required when TABLE is used.<br />

• All specified files must be sorted in ascending order of the key variables. If necessary, use<br />

SORT CASES before MATCH FILES.<br />

• A lookup file cannot contain duplicate cases (cases for which the key variable(s) named<br />

on BY have identical values).<br />

• An asterisk on TABLE refers to the working data file.<br />

• Cases in a case file that do not have matches in a table file are assigned system-missing values<br />

(for numeric variables) or blanks (for string variables) for variables from that table file.<br />

• Cases in a table file that do not match any cases in a case file are ignored.<br />

Example<br />

MATCH FILES FILE=* /TABLE=MASTER /BY EMP_ID.<br />

• MATCH FILES combines variables from the SPSS-format data file MASTER with the<br />

working data file, matching cases by the variable EMP_ID.<br />

• No new cases are added to the working file as a result of the table lookup.<br />

• Cases whose value for EMP_ID is not included in the MASTER file are assigned systemmissing<br />

values for variables taken from the table.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!