Specifies an attention, instructional, or trap check item at instrument
design time. The check is stored in the instrument object and evaluated
against collected response data by quality_report(). This function only
defines the check. Evaluation happens later in quality_report().
Arguments
- id
Character. A unique identifier for this check.
- item_id
Character. The
idof the item used as the check. The item must be defined separately withsf_item()and included in the same instrument.- type
Character. The check type. One of:
"attention": the item has a stated correct answer and flags respondents who answer incorrectly."instructional": a manipulation check item used to test whether instructions were followed."trap": an item designed to be selected only by inattentive respondents (e.g. "Please select Strongly agree for this item.").
- pass_values
Vector or NULL. The response value or values that constitute a pass. For
"attention"and"instructional"types, at least one value should be supplied. For"trap"types, this is the value that should NOT be selected.- fail_action
Character. What
quality_report()does with respondents who fail this check. Either"flag"(mark in the report but retain) or"exclude"(mark for exclusion).- label
Character or NULL. An optional human-readable label for the check, used in the quality report.
- notes
Character or NULL. Optional free-text notes about the purpose or rationale of this check.