Item Configuration - KL-Psychological-Methodology/TWatch-2020-ESM GitHub Wiki

Configuring items is patr of the overall configuration. To see more on that go to Configuration File

Items are defined as JSON objects within a questionnaire definitons items array. All items share the following common keys:

  • item: The item's name. This is used to identify the item in the response file. This name is never shown to the participant, so using shortcodes is ok.
  • prompt: Each item has an instruction text defined by this key.
  • mandatory: A boolean value indicating if the item can be skipped without input.
  • type: This defines the items type, and what other keys are expected. The available item types are Likert scale, visual analogue scale, numeric, options, and text. See below for detailed explanations of the individual item types.

Likert Scale

This is a discrete scale of a small number of steps between two end points. The end points can have text labels. The scale's heigt and total width are fixed, with the width of individual points beind calculated by equally dividing the total width. Therefore individual points on a scale with a lower number of points are easier to select, as they are larger. We do not recommend to go beyond a 7-point scale, as the individual points become too small to reliably select. When logged, the leftmost point is indicated by a 1, the second by a 2, and so on.

A Likert Scale item is defined by setting "type": "likert". The following additional keys are used to define a Likert scale type item:

  • res: The resolution of the scale, i.e., number of points.
  • l_lab: The label of the left scale end.
  • r_lab: The label of the right scale end.

Visual Analogue Scale (VAS)

This item gives a continous response option realized by a slider. It can have labels at either scale end. The scale goes from 0 on the left end to 100 on the right end, making it a 101-step scale (however, these steps are technically not equidistant, as the whole scale is around 220 pixels wide).

A VAS type item is defined by setting "type": "likert". The following additional keys are used to define a VAS type item:

  • l_lab: The label of the left scale end.
  • r_lab: The label of the right scale end.

Numeric

This item type allows for numeric responses. It consists of a number display in which on of the digits is highlighted. Participants can tap digits to highligt them. Two buttons then allow the participant to increment or decrement the selected digit.

The initial value will either be 0, or the set minimum value, if it is higher.

A numeric type item is defined by setting "type": "numeric". The following additional keys are used to define a numeric type item:

  • digits: The number of digits.
  • min_val: The minimum number that can be entered. This is an integer number.
  • max_val: The maximum number that can be entered. This is an integer number.
  • dot_pos: The position of the point, counted from the right. Omit or set to 0 for integer input. Note that this is for display only, and the logged value will ignore this. To resore the value inputed, you will need to divide the value from the response file by 10^dot_pos.

Options

The options type item allows to display multiple text options for the participant to choose from, similar to a dropdown menu. These options are presented in a roller, with up to three options visible at a time and the middle (selected) option highlighted. The participant can navigate it by swiping through the options.

A options type item is defined by setting "type": "option". Only one other key is used to define a options type item:

  • options: This defines the options in a single string, with the different options being separated by \n. E.g., to define the options "yes", "no", "no answer", you would set `"options": "yes\nno\nno answer".

Note that the identifyer for the item type is "option" (singular), while the key to define actual response options is "options" (plural).

Text

A text item is a pseudo-item without any response options. It can be used to display a larger amount of text, e.g., as instruction text for the following items. Text items are omitted in the response file.

To define an item as text item, set "type": "text". A text item definition has no further keys.