Use the pass if
and fail if
tags to create attention check variables for evaluating respondent data.
1. Which of these is not a type of fruit?
type: radio
pass if: 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
fail if: 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
pass if
andfail if
tags are often used on quality control questions. - Both tags accept an option ID or logical expression for input. If the input evaluates as "true" for
pass if
, the check is passed. If the input evaluates as "true" forfail if
, the check is failed. - Each question with a
pass if
orfail if
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'.
- If CheatSweep is enabled, these tags create the
attention_pass_count
andattention_fail_count
variables and also influence the CheatSweep score.
Additional examples
Evaluating text responses
Surveys often ask respondents to enter a specific word or phrase as an attention check. 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
pass if: $Q3 eq 'alabaster'
The above logic could be modified for fail if
by using an 'ne' (not equal to) operator.
3. Type in the following word: <b>alabaster</b>
type: text
size: 12
fail if: $Q3 ne 'alabaster'
Evaluating table rows
pass if
and fail if
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.
5. Do you shop at the following places?
pass if: 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.