Group Logic allows you to randomize questions or sets of questions within a survey. Most commonly , it is used for monadic or sequential monadic survey design, but can also be used to simply randomize a few questions.
Group logic must be entered into a question either before the grouped section, or can be entered into the first question programmed within the group. A single logic statement starting with [group...] sets the rules that determine how the respondents are directed through the groups in your survey flow.
If you want to randomize the order that respondents see certain (consecutively programmed) questions, enter this logic syntax into the first question within the group, OR into a question preceding the group:
[group Q2 and Q3 and Q4]
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 or paths), enter the logic syntax into the first question of the first group, or into any question preceding the first group:
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 in all three sets, they will proceed to the next relevant question in the survey.
Note: Make sure your question numbers do not 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 to the end of the group logic. In this example, respondents will randomly see only ONE of the questions listed in the group:
In this example, respondents will be randomly assigned to two of the listed groups (Q1-3, Q4-6, or Q7-9):
If you intend for all respondents to see all questions within those listed in the group logic, then the max qualifier is not needed.
Advanced Grouping: Group Balance
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
Balance exposure groups based on demographic traits, such as gender, age, etc.
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 by gender: [Group Q2-4 and Q5-7 and Q8-10 balance gender = “f”, gender = “m” max 1]
Balance by age: [group Q2-4 and Q5-7 and Q8-10 balance age = '18-15' and age = '26-41' max 1]
Balance on Questions and Answers
You can also balance by any questions or answers in your survey that precede the groups.
Example Request: Ensure equal distribution for answers Q5a8, Q5a9, Q4a2 among groups [Group Q6-9 and Q10-13 and Q14-17]
By default, Group logic works with the "least-fill" method, meaning that, when a respondent enters the set of group logic they will be sent to the group with lowest number of completed respondents at that point in fielding. This usually means groups will fulfill evenly, +/- 5 respondents (on average). There is no need to add anything to the syntax, but if you would like to ensure least-fill, you can add leastfill to the logic, after the last listed question/set.
You can modify the assignment method to be truly random by adding randfill to your group logic syntax. Example: [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 each node. Using randfill can help reduce chance of order bias in the order when 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 leastfill assignment attempt at balancing fulfillment at the total level, or by subgroups.
Learn more about Group Logic in our Lighthouse Academy course, Group Logic and Smart Loops!