Merging Data Files in SPSS

For merging SPSS data files with similar cases but different variables, use MATCH FILES. Make sure your case identifier -if any- doesn’t contain duplicate values and the files are sorted ascendingly on it. The result contains all cases from both files (like a full outer join in SQL).Second, MATCH FILES also performs a table lookup as illustrated below. SPSS […]

SPSS – Splitting a String Variable

After importing some data into SPSS, some answers ended up in a single string variable. The data are in splitstrings.sav, part of which is shown below. Excel has a nice “text to columns” function to split it but SPSS hasn’t…So you think you can syntax?Then let’s go and split this string into the original answers. Step 1 – New […]

Concatenate (General Concept)

Concatenating two or more strings is creating a new string consisting of the characters of the first string followed by the characters of the subsequent string(s) in their original order. SPSS CONCAT Function Concatenating in SPSS is done by the CONCAT function. The most basic usage is COMPUTE A = CONCAT(B,C,D). Note that you can concatenate only strings. For concatenating numbers, […]