For each value (1 to 13 in this example):ī.
Which variables are to be stacked, and how many stacked variables will there be in the final data set? In the image above, there are 3 stacked variables in the final stacked data.
Spss code new variable download#
You can download the data file that we used from:Ī subset of the data before and after stacking is shown in the image below.īefore you start stacking you should work out: In this example we consider data from a simple survey which asked people about how they rate different technology brands.
Spss code new variable how to#
In this article we look at how to stack data that has been loaded into SPSS Statistics, using both the interactive wizard and using syntax via the VARTOCASES command. The number of variables in the data decreases, and the number of cases increases. Data stacking is a data preparation step where a data set is split into subsets, and the subsets are merged by case (or stacked on top of one another).