Both are on the Analysis Workbench, beside the procedure you are running. See Run an analysis in the workbench.
Select cases
Under Select cases, choose Add a condition. Then pick a variable.
- For a question with answers, tick the Categories to keep.
- For a number, such as age or income, give a Range: a lowest and highest value. Both ends are included. Leave one empty for no limit.
- For a date answer, or Date submitted for when a response came in, give Dates: the first and last day, both included.
An ordered question can be filtered by Categories or by Range. Choose Not on any condition to keep every case it does not pick.
With two or more conditions, choose whether cases must meet all of these or any of these.
A case whose answer is missing is never selected by a condition on that answer, nor by its Not. A declared missing code, such as "Refused", can still be picked as a category, but it is never inside a range.
The result names the selection it rests on, and how many responses it kept out of how many there were. A selection that keeps no case is refused with both counts, rather than run on nothing.
Weighted and design-based tests treat a selection as a subpopulation: every cluster of the sample stays in the variance, as Stata's subpop() and R's survey do. Dropping the other cases first would understate the margin of error.
Split file
Under Split file, choose the variable whose groups you want, such as ward, sex or an age band you made with Recode, band or compute a variable. Then run the procedure.
It runs once for each group, inside any selection you made, and prints each result under its group with the group's case count and its own run number. Each is a recorded run of its own, so it can be replayed and exported like any other. Cases with no answer on the split variable are in no group, and the results say how many there are.
A variable with more than thirty groups is refused. Recode it into fewer groups first. To compare the groups side by side in one table, use a cross-tab with a layer.