SPSS Tutorials

BASICS REGRESSION T-TEST ANOVA CORRELATION

SPSS Add Files – Cautionary Note

Introduction

Merging files with the ADD FILES command can be tricky. If variables or values have different meanings in different files, the result may be severely biased. Nevertheless, the command will run smoothly and the data will look normal.

SPSS Add Files Returning Incorrect Data

SPSS Syntax Demonstration

*1. Create first dataset.

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

variable labels v1 'Gender'/v2 'Employment status'.

value labels v1 0 'Female' 1 'Male' / v2 0 'Employed' 1 'Unemployed'.

dataset name data_1.

*2. Create second dataset.

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

variable labels v1 'Gender'/v2 'Marital status'.

value labels v1 0 'Male' 1 'Female' / v2 0 'Married' 1 'Not married'.

*3. Merge datasets.

add files file = */file = data_1.
exe.

*4. Check results.

set tnumbers both tvars both.
frequencies all.

Explanation

Notes

Previous tutorial: SPSS ADD FILES Command

Next tutorial: SPSS VARSTOCASES – What and Why?

Let me know what you think!

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