Quotas can be programmed using one of two different methods. Quotas can be programmed directly within a question by including the quotas: y
tag, or as a separate variable using type:
quotas
. Setting a quota directly in the question is very useful if the question options are the same as the quota groups you need to create and the same conditions can apply. If there is a new list or different conditions driving what quota group(s) should be assigned, using a separate variable is the better choice. Below are examples of both quota creation methods, along with some additional details to consider when creating quotas.
'quotas' tag
The quotas
tag can be used on any radio, pulldown, or checkbox question and can accept 'y' (yes) and 'n' (no) inputs, specified option IDs, or conditional statements. It tells the system to automatically create a quota variable and attach it to the question. The quota variable is named QX_QUOTA, where X is the ID of the question using the quotas
tag. When the quotas
tag is used on a checkbox question and more than one quota group can be assigned, the QX_QUOTA variable will default to the same maximum allowable number as the question upon which it is based.
Starting in r8, if a term: y
decorator is added next to an option, and the question includes the quotas
tag, that non-qualifying option will automatically be excluded from the quota groups created for the question.
Tip! To override the _QUOTA suffix and personalize the text, use the quota_suffix
tag.
Basic
In the example below, Q1, a radio question, will create the single-select Q1_QUOTA variable, and Q2, a checkbox question, will create a multi-select Q2_QUOTA variable.
1. What is your gender? type: radio quotas: y 1. Male 2. Female 2. Which of these pets do you have at home? type: checkbox quotas: y 1. Cat 2. Dog 3. Fish 4. Bird
Note: The quotas: y
tag may not be placed on a survey variable that also has a selectby
tag in versions prior to r8.
Adding quota text
The quota variable's description text will be the question text with 'Quota for' prepended to it. To create a custom description, use the oqtext
tag. In the example below, we have adjusted the text to say "QUOTA | GENDER."
Example | Resulting Topline tile |
1. What is your gender? |
Including or excluding options
In addition to the 'y' or 'n' inputs, the quotas
tag also accepts numerical values and ranges, which correspond to option IDs for the question to which the quotas
tag is applied. The specified range/option IDs must be wrapped in square brackets - '[ ]' - following the rules for including or excluding options. Consider the following example:
1. What is your gender? type: radio quotas: y 1. Male 2. Female 98. Prefer not to answer
Suppose a researcher does not want to create a quota bucket for the "Prefer not to answer" group. This might be because the group eventually terminates or for purposes related to representative sampling. To avoid creating a quota bucket for this group, specify the option IDs in the quotas
tag which should have quota buckets.
1. What is your gender? type: radio quotas: [1,2] 1. Male 2. Female 98. Prefer not to answer
In the system-generated quota Q1_QUOTA, there will be no '98. Prefer not to answer' bucket.
This technique may also be applied using ranges in the event that there is a longer list of option IDs. A common occurrence of such a case might be an age question. Imagine that under 18 respondents and those who are 65 and older are not allowed to take the survey and they terminate. In this circumstance, there would be no reason to create quota buckets for these groups. The range is written by indicating the lowest qualifying option ID first, e.g. 2, followed by two decimals, followed by the highest qualifying option ID, e.g., 10. As mentioned above, you must wrap the range in square brackets '[ ]'.
1. What is your age? type: radio quotas: [2..10] 1. <18 2. 19-24 3. 25-29 4. 30-34 5. 35-39 6. 40-44 7. 45-49 8. 50-54 9. 55-59 10. 60-64 11. 65+ 98. Prefer not to answer
Exclusionary syntax also will work as an input to the quotas
tag. The previous example could have also been written as:
1. What is your age? type: radio quotas: -[1,11,98] 1. <18 2. 19-24 3. 25-29 4. 30-34 5. 35-39 6. 40-44 7. 45-49 8. 50-54 9. 55-59 10. 60-64 11. 65+ 98. Prefer not to answer
Conditional input
The third type of input that the quotas
tag will accept are conditional ranges. The condition is defined within brackets with an "if statement" that tests the condition against each option ID for the question to which it is applied. As such, it would be possible to rewrite the previous gender question, wherein code '98' is excluded from Q1_QUOTA, like this:
1. What is your gender? type: radio quotas: [ if [id]<10 ] 1. Male 2. Female 98. Prefer not to answer
Options '1' and '2' meet the condition (being less than 10), whereas option '98' does not.
Quota chapter
Quota variables generated by using quotas: y
on a question appear in the Quota variables sub-chapter of the Appendix chapter. To make a quota generated by quotas: y
appear in a different place in the Reporting field tree, use the quotachapter
tag and specify the desired label of the chapter where the quota should appear (e.g., 'X'). Additionally, make sure the chapter is defined in the survey source. Read more about the define chapters widget here.
define chapters X. Another Chapter 1. What is your gender? type: radio oqtext: QUOTA | Gender quotas: y quotachapter: X 1. Male 2. Female
Creating quotas and click balance quotas together
Starting in r8, the quotas
tag can be applied to a question alongside the click balance quotas
tag (alias cbq
) to simultaneously create a quota variable and a click balance quota variable from the same question. In the following example, QINCOME will generate both a quota variable of QINCOME_QUOTA and a click balance quota of QINCOME_CBQ. By default, quotas will appear in the Quota variables chapter in the Reporting Field Tree, with CBQs appearing in the Click Balance Quotas sub-chapter, unless otherwise assigned to another chapter.
INCOME. Which of the following categories best represents your annual household income (before taxes)? type: radio cbq: y quotas: y 1. Less than $25,000 2. $25,000 - $49,999 3. $50,000 - $74,999 4. $75,000 - $99,999 5. $100,000 - $149,999 6. $150,000 - $199,999 7. $200,000 or more
Tip! The cbq
tag can also be included on a type: quotas
variable to simultaneously create a quota variable and a click balance quota variable from the same question.
'type: quotas'
When quota groups do not match the options of a single question, or have dependencies on factors other than a single question, a stand-alone variable should be created to manage them. In the example below, QGENDERAGE is a single-select, standalone quota variable whose options are selected based on the conditions defined on each option. In this case, each option is derived from a combination of options from Q1 and Q2.
Unless otherwise specified, type: quotas
variables default to using selectby: condition
.
1. What is your gender? type: radio 1. Male 2. Female 2. Which of these includes your age group? type: radio 1. 18-29 2. 30-39 3. 40-49 4. 50-59 5. 60 or older GENDERAGE. Gender quota type: quotas 11. Male 18-49 { if anyChecked($Q1,1) and anyChecked($Q2,1,2,3) } 12. Male 50 or older { if anyChecked($Q1,1) and anyChecked($Q2,4,5) } 21. Female 18-49 { if anyChecked($Q1,2) and anyChecked($Q2,1,2,3) } 22. Female 50 or older { if anyChecked($Q1,2) and anyChecked($Q2,4,5) }
For more information about quota type variables, see Common quota tags.
Comments
0 comments
Please sign in to leave a comment.