Example (VARSTOCASES command)

The following is the LIST output for a data file where repeated measurements for the same case are stored in variables on a single row:

caseid          var1         var2         var3    var4

001              .00          .05         5.00    3.00
002             7.00         1.00         5.00    4.00
003             6.00         3.00         6.00    2.00

The command:

VARSTOCASES 
	/MAKE newvar FROM var1 TO var4.

creates a new variable, newvar, using the values of var1 through var4. The LIST output for the new active dataset is as follows:

caseid      newvar
 
001            .00
001            .05
001           5.00
001           3.00
002           7.00
002           1.00
002           5.00
002           4.00
003           6.00
003           3.00
003           6.00
003           2.00

The values for the new variable newvar are the values from var1 through var4 from the original data. There are now four rows for each case—one row for each variable that was named on the FROM list.