Group Logic allows you to randomize questions or sets of questions within a survey. Most commonly used for monadic or sequential monadic survey design, but can also be used to simply randomize a few questions. This article will cover simple to complex uses cases for [group] logic.
Group logic can be used in any question at the start of, or before, the groupings you want to make. Use a single logic statement to set the groups and the rules that determine how the groups are directed through your survey flow.
Testing in Preview mode is the best way to see if the survey is structured the way you want it.
If you want to randomize the order that respondents see certain questions, the logic syntax will look like this:
[group Q1 and Q2 and Q3]
When respondents get to the first question in your group logic statement, they will see those three questions in a random order. Once they complete all three questions, they will be sent to the next available question in your survey (depending on any other logic you have applied). Randomization is generated individually for each respondent.
If you want to randomize the order that respondents see sets of questions (also called nodes), the logic syntax should look like this:
[group Q1-3 and Q4-6 and Q7-9]
Questions that make up the set (Q1, Q2, Q3) will be shown in order but respondents will see the sets of questions starting with Q1, Q4, or Q7 in a random order. Once respondents complete all the questions they will automatically be sent to the next relevant question in the survey.
Note: make sure your question numbers don’t overlap between sets or the logic will not work.
If respondents should only see some, but not all, of the questions or sets of questions, you can add a max qualifier.
[group Q1 and Q2 and Q3 max 1]
In the above example, respondents will randomly see only one question (Q1, Q2, or Q3).
[group Q1-3 and Q4-6 and Q7-9 max 2]
In the above example, respondents will randomly see a max of two of the groups (Q1-3, Q4-6, or Q7-9).
Note: If respondents should see all questions the max qualifier is not needed.
Within group logic you can add the keyword Balance to add balancing assignment to each group for key segments as defined by previous survey answers and/or available demographic traits. The Balance keyword ensures that not only is group assignment balanced at the Total level but also assignment for each of the defined segments.
Balance on Demographics
Example: You want to balance your groups on gender.
Logic Expression: [Group Q2-4 and Q5-7 and Q8-10 balance gender = “f”, gender = “m” max 1]
Note: Adding balance on demographics means each node will be balanced on the gender distribution of the survey. If you need gender to be balanced overall, you will want to apply quotas from the Target Market page.
Balance on Questions and Answers
You can also add balance from any question or answers in your survey that precede the groups.
Example Request: you want to ensure equal distribution of these answers Q5a8, Q5a9, Q4a2 among these groups [Group Q6-9 and Q10-13 and Q14-17]
Solution: [Group Q6-9 and Q10-13 and Q14-17 balance Q5a8, Q5a9, Q4a2]
By default, Group logic works on the least fill method, meaning when a respondent enters the group logic they will be sent to the group with lowest number of completed respondents. This usually means groups will fulfill evenly +/- 5 respondents on average. No need to add anything to the syntax shown above.
You can modify the assignment method to be random chance by adding 'randfill' to your group logic syntax.
Logic Expression: [group Q1-3 and Q4-6 and Q7-9 randfill]
When randfill is added to group logic it randomly assigns respondents to nodes and does not take into account how many other respondents have been assigned to those nodes. Using randfill can help reduce chance of order bias in the order respondents are assigned to multiple nodes. However, in cases where a max limit is being used, randfill may lead to more uneven fulfillment of the groups. This makes the 'randfill' assignment method strong when there is no max limit but risks uneven fulfillment as the max assignment restriction is increased. Randfill should not be used with Balance for subgroups as it overrides the least fill assignment attempt at balancing fulfillment at the total level or by subgroups.