Often, it is necessary to perform an analysis on only a subset of the participants in the dataset. For example, you might want to review the mean survey responses provided by just the female participants. A subsetting IF statement can be used to accomplish this, and the general form is presented here:
DATA new-dataset-name; SET existing-dataset-name; IF comparison; PROC name-of-desired-statistical-procedure DATA=new-dataset-name; RUN;
The comparison described in the preceding statements generally includes an existing variable and at least one comparison operator. The following statements enable you to calculate the mean survey responses for only the female participants.
15 . 16 . 17 18 5433224 ...