By Ruben Geert van den Berg on May 20, 2014 under SPSS Data Merging Tutorials.



ADD FILES is an SPSS command that's mainly used for merging data sources holding similar variables but different cases. (For the same cases but different variables, see MATCH FILES.) A second use is for reordering and/or dropping variables in a single dataset. SPSS Add FilesSPSS Add Files Matches Data Sources on Variable Names

SPSS Add Files - Basic Usage

The ADD FILES command illustrated in the screenshot above results from running the syntax below.

SPSS Add Files Syntax Example

*1. Create dataset d1.

data list free/v1 v2 v3.
begin data
1 1 1
end data.

dataset name d1.

*2. Create dataset d2.

data list free / v2 v1 v4.
begin data
2 2 2
end data.

dataset name d2.

*3. Merge d1 and d2.

add files file d1 / file d2.

dataset name merged.

SPSS Add Files Rules

SPSS Add Files Pitfalls

Comment on this Tutorial

*Required field. Your comment will show up after approval from a moderator.