If condition is satisfied combined with Filter

Here is the code produced by the combination of Select: If condition is satisfied and Output: Filter out unselected cases:

USE ALL.COMPUTE filter_$=(childs = 0).VARIABLE LABELS filter_$ 'childs = 0 (FILTER)'.VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.FORMATS filter_$ (f1.0).FILTER BY filter_$.EXECUTE.

Here are the comments on the SPSS Statistics code:

  • USE designates a range of observations to be used. USE ALL specifies that initially all observations in the file should be used.
  • The COMPUTE command computes a variable named filter_$. This is a flag variable that takes on a value of either a 0 or 1, with the 1 value corresponding to true. The statement being evaluated is whether or not ...

Get Data Analysis with IBM SPSS Statistics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.