List items can be shown in a randomized order to minimize respondent bias. Additionally, items can be anchored in specific positions. When the randomize
tag is used on a list, all elements are displayed in random order. When the anchor
decorator is added next to a list element, the item remains fixed in its position, regardless of any other ordering applied.
setlist: COLORS
randomize: y
1. Red
2. Orange
3. Yellow
4. Green {anchor: y}
5. Blue
6. Purple
7. Pink
1. Colors listed in random order, but green is anchored in place.
type: radio
optsfrom: COLORS
'randomize' tag
- The
randomize
tag accepts 'y' and 'n' inputs. -
randomize: y
is the functional equivalent oforder: [*]
. - The
randomize
tag may be applied at either the list level or question level. If applied at the list level using a setlist, the same randomized order will occur for a respondent for every question (or table) where the list is used. When therandomize
tag is included inline at the question level, all list elements will be randomized for that question only. - The
randomize
tag can be paired with theanchor
decorator to keep specific options anchored in their list positions. - The
randomize
tag can be used as a decorator or as a column header in a spreadsheet to randomize collections organized by collection headers.
'anchor' decorator
- The
anchor
decorator accepts 'y' and 'n' inputs. -
anchor: y
functions the same as using shorthand notations with '^' or '$' in theorder
tag. - The
anchor
decorator may be applied at either the list level or question level. If applied at the list level using a setlist, the list element is anchored in every question (or table) where the list is used. When theanchor
decorator is included inline at the question level, the list element is anchored for that question only. - The
anchor
decorator can be used as a column header in a spreadsheet to anchor list items grouped by collection headers. - For r9+, if a question or table uses the
randomize
ororder
tag and also includes a single exclusive option, that option is automatically anchored to the bottom of the list. Theanchor
decorator is not needed. For prior versions of the software, simply add theanchor
decorator next to theexclusive
decorator. - For r9+, if a question or table uses the
randomize
ororder
tag and also includes autoother options, these options are automatically anchored to the bottom of the list. Theanchor
decorator is not needed. For prior versions of the software, simply add theanchor
decorator next to theautoother
decorator.
Additional examples
Using 'randomize' at the question level
You can apply randomize: y
directly to a question widget to randomize the answer options for that question only.
2. Colors listed in random order.
type: radio
randomize: y
1. Red
2. Orange
3. Yellow
4. Green
5. Blue
6. Purple
7. Pink
Randomizing rows and columns in a table
Similarly, the randomize: y
tag can be used inline on a table. In the example below, note that the randomize
tag is placed after the rows
and cols
tags to clearly define which elements to randomize.
3. Select the material wanted for each piece of clothing per season.
type: radio table
randomize: y
1. Cotton
2. Wool
3. Blend
rows:
randomize: y
1. Winter
2. Spring
3. Summer
4. Fall
cols:
randomize: y
1. Socks
2. Pants
3. Shirts
If you program a table with listcalls like rowsfrom
and colsfrom
and also want to randomize options at the question level, use roworder
and colorder
instead. See Ordering tables: rows, columns, and options for more information.
Using 'randomize' and 'anchor' with collection headers
You can randomize items within collections (groups) and anchor individual items as needed. In the ICECREAMS list below, items within the "Cream-based" group are randomized, as are those within the "Chocolate-based" group. However, Dark Chocolate will always appear as the last flavor in the "Chocolate-based" group.
set list: ICECREAMS
100. Cream based {collection header: y} {randomize: y}
1. Fior di latte
2. Cookies and Cream
3. Vanilla
200. Chocolate based {collection header: y} {randomize: y}
4. Choco-cookie crunch
5. Rocky Road
6. Milk chocolate
7. Dark chocolate {anchor: y}
4. What is your favorite ice cream?
type: checkbox
optsfrom: ICECREAMS
Anchoring autoothers and exclusive options
In software versions prior to r9, autoothers and exclusive options are randomized within lists using the randomize
tag. To change this behavior, add the anchor
decorator next to the list element, alongside the autoother
or exclusive
decorator.
2. Which color is your favorite?
type: radio
randomize: y
1. Red
2. Orange
3. Yellow
4. Green
5. Blue
6. Purple
7. Pink
97. Other color {autoother: y} {anchor: y}
99. None of these {exclusive: y} {anchor: y}
Tip! See Default survey settings (set defaults) to learn how to apply the anchor autoother
and anchor exclusive
tags directly to the survey's set defaults
.
Comments
0 comments
Please sign in to leave a comment.