Use the passif
and failif
tags to create attention check variables for evaluating respondent data.
1. Which of these is not a type of fruit?
type: radio
passif: 2
randomize: y
1. Apple
2. Carrot
3. Peach
4. Blueberry
2. Which of these brands have you purchased in the last 12 months?
type: checkbox
failif: anyChecked($Q2,990)
randomize: y
1. Tide
2. Dawn
3. Mountain Dew
4. Heinz
5. Nestle
6. Scott's
990. Obviously fake brand
Details
- The
passif
andfailif
tags are often used for scenarios such as age verifications where the respondent is asked their age a 2nd time to verify their initial response, or questions requesting a respondent to enter a specific word or value. - Both tags accept an option ID or logical expression for input. If the input evaluates as "true" for
passif
, the check is passed. If the input evaluates as "true" forfailif
, the check is failed. - Each question with a
passif
orfailif
tag generates a tracking variable in the System Fields chapter. For questions, the variable is named 'QX_ATTN', where 'X' is the original question ID. For tables, the variable is named 'TX_ATTN'. - If the respondent passes an attention check, they are assigned a '1' to QX_ATTN. If they fail the check, they are assigned a '0'.
Additional examples
Evaluating text responses
Surveys often ask respondents to enter a specific word or phrase as an attention check. In this scenario, logic operators are used to match the response to the requested text.
In Q3, the 'eq' (equals) text comparison operator ensures the response to Q3 is 'alabaster'. If any other response is entered, the Q3_ATTN variable will receive a '0' for failing the attention check.
3. Type in the following word: <b>alabaster</b>
type: text
size: 12
passif: $Q3 eq 'alabaster'
The above logic could be modified for failif
by using an 'ne' (not equal to) operator.
3. Type in the following word: <b>alabaster</b>
type: text
size: 12
failif: $Q3 ne 'alabaster'
Evaluating table rows
passif
and failif
logic can be used within a table to flag unlikely answers, for example, shopping on the moon. In T5, respondents will pass the attention check if they select 'No' for row 990. The _ATTN variable created for T5 will be T5_ATTN.
5. Do you shop at the following places?
passif: anyChecked($Q5R990,2)
type: radio table
1. Yes
2. No
rows:
randomize: y
1. Grocery stores
2. Gas stations
3. Convenience stores
990. The moon
Comments
0 comments
Please sign in to leave a comment.