This page is still under construction.
- A Code List is re-usable, but only if the categories and code values match exactly. So ‘1-Yes, 2-No’ is different to ‘1-Yes, 0-No’. Likewise 1-Yes, 2-No is different to 1-yes, 2-no.
- Code lists used to input X and Y axis labels in grids are not Response Domains.
Code Lists are used for two purposes when documenting a questionnaire:
- To create a response domain answer when a question asks the respondent to choose from a defined list of responses
- To create row and column labels required for a question grid
For both question answers and grid axis labels, the code list generally consists of multiple categories, each of which is assigned a unique code value. A category is a single answer option within a set of multiple-choice options. Occasionally a code list may consist of a single code value and single category. (Add single category examples) [Link] Code list categories can be just a number. (Add just number Y axis example) A code list can also contain a mix of numbers and text categories. (Add scale example)
Code Lists used as an answer to a question are response domains. The Response Domain box on the input page must be ticked when creating the code list in order for the code list to be available as an answer when creating a question item or question grid.
Code Lists used to create row and column labels for grids are not response domains. Do not tick the response domain box when creating these types of Code Lists.
Code Lists are reusable, therefore when a questionnaire contains multiple questions with the same response choices, or grids with the same row and column labels, only one code list is created and is used repeatedly as a response domain or axis label where appropriate.
Note: For a Code List to be reusable, both the code values and category texts must match exactly, including capitalisation and punctuation. So the question responses of ‘1 Yes, 2 No’; ‘1 Yes, 0 No’; and ‘1 yes, 2 no’ are all different and require separate code list response domains.
Assigning code values
If a question response contains code values for the categories, these values are used in the code list. The code value may be a letter, number or symbol (e.g. '*') and the values may or may not be sequential.
If a question does not contain code values for the response domain categories, a numeric code value is entered sequentially for the categories, starting with ‘1’.
Code values for categories that are just a number mirror the number. (reference examples again?)
Code Lists for labels for ‘X’ and ‘Y’ axes in grids also require code values. These are assigned sequentially, and are always numeric (starting with ‘1’), even if there are letter designations in the questionnaire for the row or column labels.
In addition to code list categories and their code values, cardinality must be added when creating a code list. Cardinality places a constraint on the number of times an entity can appear in a relationship, i.e. whether a respondent can chose only one answer from a code list (1:1 relationship) or all that apply (1:n or 0:n relationship). For most code lists the cardinality is 1:1 and this is the default when creating a code list.
In a ‘Tick all that apply’ answer, if a respondent doesn’t need to choose a category, cardinality is 0:n, with n the total number of categories the respondent can choose. If a ‘Tick all that apply’ code list contains the category ‘None of the above’ or similar, or is within a condition which assumes that there is an answer, the cardinality is 1:n, with n the total number of categories the respondent can choose, not counting the ‘None of the above’ category. (Examples to be added)
Code List Label construction
Code list labels start with the prefix cs_. The question reference portion of the label is not collapsed.
Code lists that are answers for a single question refer to the question number in their label. A ‘q’ is added before the start of the question reference portion of the label. So the code list label for question ‘A3 a’ would be cs_qA3_a.
The IDs for code lists that are answers for multiple questions refer to the categories that make up the code list. The label is made up of the initials of the words in each category with an underscore separating the categories in the code list. So for a multiple use code list consisting of the categories ‘All of the time, Some of the time, Hardly ever, Never’ the code list label would be cs_Aott_Sott_He_N.
Note: Exceptionally to the protocol above, the categories of ‘yes’ and ‘no’ are always spelled out when they are contained in a multiple use code list. So for a code list containing ‘Yes, No, Don’t know’ the label would be cs_Yes_No_Dk’.
Code lists for labelling the X (column) and Y (row) axes in grids usually contain a reference to the grid axis the code list creates. For example, for grid question A4 (qc_A4), the label for the Y axis code list would be cs_qA4_Y, and the label for the X axis code list would be cs_qA4_X. The code list labelled cs_dash (containing the single category of '-') is used as the X axis code list for all grids with a single column with no heading label. (Add cs_dash example or refer to example in grids guidance?) When a grid has a corner label, the code list label for either the X or Y axis is the corner label text with the cs_ prefix. (Add example of corner label code list, or refer to grid example of corner label if there is one?)