The selectby tag with the balance method balances selections across multiple variables. It retrieves the current counts for each variable and selects the option that best optimizes balance.
The balanceby tag is used with selectby: balance to specify the questions/variables to be considered and "balanced" during the assignment process.
AGE. What is your age?
type: radio
1. Under 18
2. 18-24
3. 25-34
4. 35+
GENDER. What is your gender?
type: radio
1. Male
2. Female
PATH. Path assigned
type: coded single select
selectby: balance
balanceby: QAGE, QGENDER
1. Path 1
2. Path 2
3. Path 3In the example above, QPATH assigns a path by selecting the option most needed within the respondent's specific demographic group (e.g., their age bracket × gender). If two paths are equally needed within that group, QPATH breaks the tie using overall path‑level need, assigning the respondent to whichever path is further behind.
Details
-
Variables using the
selectby: balancemethod can be single-select or multiselect. Use themaxgroupstag to assign multiple options. - The variables referenced by the
balancebytag must be single-select. Single-select quotas can also be used. - Questions with a
balancebytag are hidden from respondents and are punched by the system when the page it is located on is submitted. - The
balancebytag can reference one or more variables as input. Note that referencing more variables increases the system resources required to run the process.
Additional examples
Creating a multiselect variable
In the example below we use type: coded multiple select to allow for more than one provider assignment. The maxgroups tag limits the number of selections to '3'.
S1. In which country do you currently work?
type: radio
1. United Kingdom
2. United States
3. Canada
4. Ireland
5. Australia
set list: PROV_LIST
1. Axeptio
2. CommandersAct
3. Didomi
4. Google Consent Management Solution
5. HubSpot
97. Other {autoother: y }
FORMER_PROV_SEL. Former Provider Selection
type: coded multiple select
maxgroups: 3
selectby: balance
balanceby: QS1
optsfrom: PROV_LIST
Comments
0 comments
Please sign in to leave a comment.