# LIST VARIABLES

This command lists the values of one or several variables in the output. This may be done for all cases or for a subset of cases.

Simple example:

LIST id var1 var17 var24.

More complex example:

 LIST id var1 var17 var24 / CASES FROM 1 TO 50 BY 2 / FORMAT NUMBERED.

NOTE: The command LIST VARIABLES is abbreviated into LIST in these examples,which should work with all versions of SPSS I know.

This command is useful when you want to look at several variables that cannot be viewed simultaneously in the data table window. For instance, when you have created a new variable that combines the values of several other variables, you may wish to check whether you have really achieved what you wanted. In this case, perhaps you won't need to look at all the cases in your data set (depending on its size, of course), but only at a small selection that will show you enough cases to check whether the outcome of your transformation is what you wanted. This may be achieved with the CASES keyword; in the example above, every second case out of the first 50 cases will be listed. (I cannot imagine circumstances under which listing every second case may be useful, but given that the program provides this possibility, I did not want to suppress this information. Omitting the keyword BY and the number that follows will give you all cases in the desired range).

Or you may have some cases with awkward values in a variable, which may be checked against other variables. Here, you perhaps will first FILTER those cases that have this awkward value and then have a look at several variables that may help you decide where these values come from.

The keyword FORMAT NUMBERED will give you the case numbers referring to the consecutive order of the cases in the data set.

© W. Ludwig-Mayerhofer, IGSW | Last update: 29 May 1998