Respondents' answers


These functions are used to access respondent answers.

FunctionDescriptionExample
answer(question_id, [item_id], [stimulus_id])Returns the responses in the question specified by question_id. item_id is an optional input to retrieve answers to an item in the question. stimulus_id is an optional input to retrieve answers to a particular stimulus in a monadic block.answer(1559253)
bottom(question_id, limit, [stimulus_id])Returns the N items the respondent placed at the bottom of the list in the question specified by question_id. N is determined by limit.bottom(1549283, 2)
top(question_id, limit, [stimulus_id])Returns the N items the respondent placed at the top of the list in the question specified by question_id. N is determined by limit.top(1549283, 2)
count(question_id, [stimulus_id])Returns the number of choices selected by respondents in the question specified by question_id. Function only works with multiple choice questions.count(1559253)
npsStatus(question_id, [stimulus_id])Returns the net promoter status (detractor, neutral, promoter) for Net Promoter Score questions. Specify question using question_idnpsStatus(1557233)
topLevel(attribute_id)Returns the top level(s) of an attribute specified by attribute_idtopLevel(483487)

The function answered

This function checks if the respondent answered a particular question. It returns TRUE or FALSE. If the question was not shown to the respondent, then the function returns FALSE.

Usage: answered({question_id}, [stimulus_id]), where

  • question_id is the ID of the question;
  • stimulus_id is the ID of the stimulus in the monadic block. If a question was inside a monadic block, but the stimulus ID is not specified, then the function returns TRUE if it was answered for any stimulus in the block.

The function is applicable to all types of questions. There are some special cases:

  • For intro questions, the function returns TRUE if the question was shown, and FALSE if it was not shown.
  • Some questions where answer is forced (such as Van Westendorp) will generally be answered as long as they were shown.