This content describes Snap 11. For Snap 10, the equivalent page will be in Snap 10 help
Operator |
Description |
|||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
& AND |
Both operands are initially converted to multiple response. If the conversion is successful then the result will be a multiple response value having codes set where they were set in both operands. If no corresponding codes were found then the result will be NO REPLY. If the conversion is unsuccessful or either operand was an Error then the result will be an Error. If you have two single response questions with answer codes Yes and No, E.g. 1. Do you like cheese? 2. Do you like chocolate? then:
The AND operator has uses where, for instance, a multiple-choice question was asked at the beginning of a questionnaire and repeated again at the end. The replies that were the same in both instances could be extracted by the AND operator. For example: BEFORE AND AFTER |
|||||||||||||||
| OR |
Both operands are initially converted to multiple response. If the conversion is successful then the result will be a multiple response value having codes set where they were set in either operand. If no corresponding codes were found then the result will be NO REPLY. If the conversion is unsuccessful or either operand was an Error then the result will be an Error. The OR operator may be used when analysing unprompted/prompted awareness questions. By combining the results of two variables with OR the net effect of total awareness can be obtained. For example: PROMPTED OR UNPROMPTED |
|||||||||||||||
: WITH |
Both operands are initially converted to multiple response. If the conversion is successful, then the result will be a multiple response value equivalent to the second operand 'bolted on' to the end of the first operand, so that if the first was a variable with 4 codes then the first code of the second operand would become the fifth code of the result, and so on. If both operands were NO REPLY or NOT ASKED then the result will be NO REPLY. If the conversion is unsuccessful or the resultant multiple value has more than 2000 codes or if either operand was an Error then the result will be an Error. The WITH operator is particularly useful for building a complex column definition (or banner) to analyse multiple attributes of a respondent on one crosstabulation. For example; specifying the columns of a crosstabulation as: AGE with SEX with SEG |
|||||||||||||||
% PER
|
To generate an analysis of all combinations of the variable names specified. For example, variable AGE has 4 categories: "under 18", "18-25", "26-35", "over 35", and variable SEX has 2 codes of "Male" and "Female". A table specified as AGE per SEX, where AGE had 4 codes, will automatically generate a table of 8 values: "under 18 Male", "18-25 Male", "26-35 Male", "over 35 Male", "under 18 Female", etc. |
|||||||||||||||
! NOT |
The operand is initially converted to multiple response. If the conversion is successful then the result will be a multiple response value having codes set where they were not set in the operand, and no codes set where they previously were set. If the operand was originally NOT ASKED or NO REPLY then every code will be set. If every code was originally set then the result will be NO REPLY. If the conversion is unsuccessful or the operand was an Error then the result will be an Error. |
|||||||||||||||
, |
The comma works as a list separator, allowing you to use multiple variables on the same axis |
|||||||||||||||
|
The tilde or To is a range specifier, allowing you to use multiple variables on the same axis. |
|
See Also |