UCL WIKI

UCL Logo
Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

This page is still under construction.

Info
titleKey Considerations
  • Use only one branch in each condition if possible; if there is an alternative option add this as a statement.
  • Always use the true branch if possible to do so.
  • Questions must remain in the correct order, exactly as they appear in the original questionnaire.
  • Multiple conditions can be derived from one question.
  • Conditions can apply to more than one question.

...

In Archivist a condition is made up of the label, condition text, condition logic and it has a positional element. The condition gets labelled after the question that the condition depends on. This is usually the preceding question. The label should be in the format c_q[questionref], for example c_q18. See Construct a Label for more on how to name conditions.

Most conditions have a straightforward structure which funnels certain respondents towards the next question. For example, if question 1 is 'Do you smoke?' with the answers 'Yes' or 'No', then further questions might only be required for those who answered 'Yes'. This will lead to the next question being situated in the true branch. If the answer is 'No' the respondent skips to the next question.

It is common that the condition is included in the same sentence as the question text, in which case this needs splitting to avoid repetition. In Example 1 below, 'If yes,' becomes the condition text and the 'please could you describe' becomes the question text. Note that the 'p' in 'please' is kept in lower case. There is often a natural break such as a comma to help with the decision on how to split text. But if not, then you must use your own judgement.

Labelling

The label should be in the format c_q[questionref], for example c_q18. The condition label contains a collapsed version of the question label it references. That is, any underscores which are in the question label are removed from the condition label in order to distinguish between the question number and the condition number. For example if a condition was labelled c_q14_ii it would not be able to tell if this refers to question 14_ii or whether it is the second condition from question 14. If it was referring to question 14_ii then the condition label would be c_q14ii. See Construct a Label for more on how to name conditions.

 

The following list details the examples which are included within this wiki page.

More complex condition :
Info
titleExamples
Condition examples

Anchor
simple
simple
Example 1 ALSPAC My Son/Daughter’s Health and Behaviour

...

Questionnaire layout:

Archivist view (alspac_94_msdhbmsdhab):

Image RemovedImage Added

Anchor
Elsebranch
Elsebranch
Using the else branch

In Example 2, the true branch cannot be used because the questions must appear in the correct order. Question A13di must come next but this is not true to the condition ‘Go to A13e below', and so it is added to the false branch. The directional statement ‘Go to A13e below’ is incorporated into the condition text and the true branch is left empty.

Example 2 Questionnaire: ALSPAC My Son/Daughter’s Health and Behaviour

...

Questionnaire layout:

Archivist view (alspac_94_msdhbmsdhab):

Image RemovedImage Added

Anchor
Multiple
Multiple
Multiple condition text for one question

There are occasions when there are two options for the condition from one question. In this case, the true branch is used if possible, and the alternative option is added as a statement. In Example 3 below, 'If yes' is the true branch and is entered as the condition. ‘If no, go to A4 on page 4’ is entered as a statement, positioned before the condition. If a directional statement is on its own (with or without a directional arrow) or directs you to the next question, it does not have any meaning and as such it is left out. In Example 4 below, 'Go to Section D' is ignored.

Example 3 Questionnaire: ALSPAC My Son/Daughter’s Health and Behaviour

...

Questionnaire layout:

Archivist view (alspac_94_msdhbmsdhab):

Image RemovedImage Added

Example 4 Questionnaire: ALSPAC My Son/Daughter’s Health and Behaviour

...

Questionnaire layout:

Archivist view (alspac_94_msdhbmsdhab):

Image RemovedImage Added

Anchor
Multiple2
Multiple2
Multiple conditions from one question

...

Archivist view (nshd_52_iwm):

Image RemovedImage Added

Anchor
Constructed
Constructed
Constructed conditions

...

Archivist view (nshd_69_pq):

Image Removed   Image Added

 

In rare cases, a question can include an answer option in the code list that indicates that the question may not be applicable to some respondents. And therefore it would be skipped. A condition, although implied, is not given in the questionnaire. A separate question is constructed using the answer option which indicates the next questions will not be answered. In Example 7 below, a condition is constructed using text from this answer option 'if we are never apart'. The true branch of the condition is left empty and the main (original) question is placed in the false branch.

Example 7 Questionnaire: ALSPAC My Son/Daughter’s Health and Behaviour

...

Questionnaire layout:

Archivist view (alspac_94_msdhbmsdhab):

Image RemovedImage Added

Anchor
If
If
Conditions that do not contain ‘If’

...

Archivist view (nshd_63_sq):

Image RemovedImage Added

Anchor
Logic
Logic
Condition logic

...

Archivist view (ncds_69_eq):

Image RemovedImage Added

Example 10 Questionnaire: NCDS Parental Questionnaire 1974

...

Archivist view (ncds_74_pq):  

Image Removed   Image Added

Anchor
Grids
Grids
Grids and condition logic

A one column grid is the most common kind of grid structure used and is the simplest to reference in the condition logic. Grid coordinates, $X;Y, are used to specify a cell or multiple cells of a grid. See Table 2. Grid Coordinates for more details. In Example 11 below, you can reference the grid as a whole because the question states that the answer is for any of the sub-questions B2a-s. Implicit in the grid logic is that each cell answer is considered to be an || OR, so in this example any of the answers could equal 3 rather than an && AND which would mean all answers must be 3. Please refer to Example 16 as to how to reference grid cells using the AND comparator. 

Also note that, 'Otherwise go to section C.' is added on to the condition text as there is no suitable position to enter it as a statement.

Example 11 Questionnaire: ALSPAC

...

Child’s Behaviour and Abilities

Questionnaire layout:


 

Image Modified

Archivist view (alspac_99_cba):

Image RemovedImage Added

 

A more complicated condition in terms of grid logic is shown in Example 12 below. In this case, only some of the answer responses in the grid are applicable (marked with an *) for the condition to be true. Therefore, the condition logic only references these specific grid cells. See Table 2. Grid Coordinates for more details.

Example 12 Questionnaire: ALSPAC My Son/Daughter’s Health and Behaviour

...

Questionnaire layout:

Archivist view (alspac_94_msdhbmsdhab):

Image RemovedImage Added

Anchor
Empty
Empty
Conditions containing ‘empty’ logic

...

Archivist view (nshd_52_iwm):

Image RemovedImage Added

Anchor
Ranges
Ranges
Using ranges in condition logic

...

Archivist view (bcs_86_fatow):

Image Removed Image Added

Anchor
Null
Null
Using NULL in condition logic

...

Archivist view (ncds_02_sc_2):

Image Removed Image Added

Advanced condition

Anchor
grid
grid
Grid cell referencing

Conditions range in complexity within questionnaires . Sometimes conditions have complex condition logic, for example, when the logic refers to axes in a question grid, as shown in Example 16 below:and sometimes need to reference specific cells within a grid. When referencing several cells in a grid at once, each of the grid cells in the logic is effectively compared with an OR e.g. if the logic qc_A3 != 1 was used for the example below, to cover all grid cells, it would effectively be qc_A3$1;1 != 1 || qc_A3$1;2 != 1 || qc_A3$1;3 != 1. This would mean that any of the options could not equal 1, but we need all of the options not to equal 1. Therefore, each cell has to be referenced individually qc_A3$1;1 != 1 && qc_A3$1;2 != 1 && qc_A3$1;3 != 1 with AND in between.

Example 16 Questionnaire: ALSPAC Parent Adult Learning

...

Questionnaire layout:

Image RemovedImage Added

Archivist view (alspac_04_pal):

Image RemovedImage Added

 

Anchor
Condition Notation
Condition Notation

...