Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Statscraft 0.61.0, release v0.61.0

FILTER

Leave out of procedures the cases whose filter value is 0 or missing.

Syntax

FILTER BY var.
FILTER OFF.

The cases stay in the dataset. The filter is kept with the dataset, follows a rename and ends when the variable is deleted or the dataset replaced.

Example

GET FILE='survey.sav'.
COMPUTE app_user = (ch_app = 1).
FILTER BY app_user.
DESCRIPTIVES age spend.
FILTER OFF.
DESCRIPTIVES age spend.

The example reads the sample data file survey.sav, an invented customer survey; save it in the folder you run the syntax from.

Example output

Descriptive Statistics

VariableLabelNMeanStd DevMinimumMaximum
ageAge in years8639.9012.161864
spendMonthly spend in euros8439.2413.6515.7994.52
Valid N (listwise)84
Missing N (listwise)2

statscraft help FILTER prints the same text in the terminal. All commands