Professional > Interview scripting > Quota control > Keeping track of quotas > Quotas in projects that use sample management
 
Quotas in projects that use sample management
When a project uses sample management, quota control can be based on sample data, questionnaire data, or a combination of the two. In fact, you can define dependent quotas where some of the characteristics come from the sample and others come from the questionnaire. For example, if the sample records contains personal data such as age and gender and the questionnaire asks which make of car the respondent owns, you can set up quotas for men who own Porsches or young people who own sports cars.
Refer to How to write a quota control system to find out how to write these sorts of scripts.
When a project uses sample management and quota control, you need to be particularly careful that none of the sample field names is the same as a question or variable name in the script. If there are fields and variables with matching names (you have a sample field and a question called gender, for example) you will not be able to quota on these sample fields or questions.
Quotas based solely on sample data
When a quota is based solely on sample data--in the example, only on age or gender--and the quota is to be tested before respondents start the questionnaire, do the following:
define the quota groups and targets using Quota Setup.
write a sample management script (.mrs file) that tests the quotas and either starts the questionnaire or terminates the interview depending on whether the quota target has been met.
There is no need to include quota testing statements in the interviewing script because quota control takes place completely outside the script.
Note The sample management script must deal with everything that the quota testing statements do for script-based quotas. This includes not only deciding whether to terminate the interview when the sample-based quotas are exceeded, but also incrementing or decrementing the associated pending and rollback counts at the appropriate points. You must also specify what must happen when an interview is stopped or times out.
Quotas based solely on questionnaire data
When a quota is based solely on questionnaire data (in the example, only on car ownership) all the quota control takes place once the questionnaire has started, so do the following:
define the quota groups and targets using Quota Setup.
put one or more quota testing statements in the routing section of the script at the points at which you want to test quotas.
if thee project has a sample management script, write statements that will increment the complete or rollback quota counts once the sample record has been returned from the interview. If you forget to do this, none of the pending counts will be reset at the end of the interview. (If the project does not use sample management, then you omit this step.)
Quotas based on a combination of sample and questionnaire data
When quota control is based on a combination of sample and questionnaire data, as in the example, do the following:
import the sample data that is to be used with the questionnaire data into the script using a statement of the form:
RespName.Label.Inserts["UserName"].Text = IOM.SampleRecord["UserName"]
This makes the sample data available in script variables.
define the quota groups and targets using Quota Setup. Use the script variables that you used with Inserts to access the sample data in Quota Setup. (You will not be able to use the original sample variables in the same quota as questionnaire variables.)
put one or more quota testing statements in the routing section of the script at the point you want to test quotas.
write a sample management script that increments the complete or rollback quota counts once the sample record has been returned from the interview. If you forget to do this, none of the pending counts will be reset at the end of the interview.
Using more than one quota type in the same script
You can use more than one of these methods in any project. For example, you can use sample-based quota control to restrict the number of people taking the survey, and then use script-based quota control to restrict the number of respondents giving certain answers to questions in the script. In this scenario, you must follow the rules for both types of quotas. In other words, you must write a sample management script to process the sample-based quotas and include quota testing statements in the script to test the script-based quotas. You must also use Quota Setup to define all the quota groups and targets.
Additional functionality with sample management-based quota control
As noted earlier, the sample management script controls everything to do with how sample-based quota control works. This gives you flexibility and options that are not available for script-based quotas. For example, suppose you have a project where you want to obtain 100 interviews for each of five different soft drinks. You want to make the best use of your sample, so do not want to reject a respondent just because you already have 100 interviews for one of the chosen soft drinks. You want to be able to ignore that drink and allocate the respondent to one of the cells for a chosen drink in one of the unfilled cells, or perhaps even in the cell that is least full. If the respondent drinks fizzy orange, lemonade and mineral water, for example, and the mineral water quota is full, you can allocate the respondent to the fizzy orange or lemonade categories, whichever is the least full.
See also
How the quota system works