Examples (FILTER command)
Filter by a variable with values of 0 and 1
FILTER BY SEX.
FREQUENCIES BONUS.
- This example assumes that SEX is a numeric variable, with male and female coded
as 0 and 1, respectively. The
FILTER
command excludes males and cases with missing values for SEX from the subsequent procedures. TheFREQUENCIES
command generates a frequency table of BONUS for females only.
Recoding the filter variable to change the filter criterion
RECODE SEX (1=0)(0=1).
FILTER BY SEX.
FREQUENCIES BONUS.
- This example assumes the same coding scheme for SEX as the previous example. Before
FILTER
is specified, variable SEX is recoded. TheFILTER
command then excludes females and cases with missing values for SEX. TheFREQUENCIES
command generates a frequency table of BONUS for males only.