Named Quota Types

Triplequotas Mode

Triplequotas Mode creates a resettable quota and a target quota for each quota name you reference in the questionnaire. To use this mode, you must specify the TRIPLE_QUOTAS option on the header statement and use the TARGET compiler command at the beginning of the interview.

The syntax for Triplequotas Mode is:

!QUOTA,REGULAR,<quota name or location of name to increment>,amount to increment,<NOW>

In the following example, three quotas are created for each quota reference. For the quota NEW_YORK, NEW_YORK, NEW_YORK.R (meaning resettable), and NEW_YORK.T (meaning target) are created. Each time NEW_YORK is incremented, NEW_YORK.R also will be incremented. You can then reset NEW_YORK.R if you want to compare the current quota value with its value at an earlier time in the study. You can use the target quota to change the value of the quota you are using as a target. In this case, you would want to write your quota checking statement to compare the quota and its target quota.

EXAMPLE:

[CTEST,,"Test of product markets",TRIPLE_QUOTAS]

{ XTARGET_NY:
!TARGET NEW_YORK=250 }
{ XTARGET_CHI:
!TARGET CHICAGO=250 }
{ XTARGET_ATL:
!TARGET ATLANTA=250 }
{ XTARGET_SF:
!TARGET SAN_FRANCISCO=250 }

''Choose which city to check for quota
{ QCITY:
Which city are you calling?
!FIELD
1 New York
2 Chicago
3 Atlanta
4 San Francisco }

''Continue the interview if the quota is not full
{ XGOTO:
!IF (QCITY(1) AND QUOTA(NEW_YORK)<250) OR &
(QCITY(2) AND QUOTA(CHICAGO)<250) OR &
(QCITY(3) AND QUOTA(ATLANTA)<250) OR &
(QCITY(4) AND QUOTA(SAN_FRANCISCO)<250)
!GOTO,QINTRVIEW }

''Display quota that is full
{ XDISP:
Thank the respondent and report that the \:QCITY: QUOTA is FULL.
!DISPLAY }

''Terminate, don't do the interview
{ XQUOTA:
!QUOTA,REGULAR,OVER_QUOTA,1,NOW }
{ XSPCB:
!SPECIAL,ABORT_INTERVIEW }

{ QINTRVIEW:
!GOTO }

BODY OF QUESTIONNAIRE

''Increment quotas at end of completed interview
{ XQUOTA_NY:
!IF QCITY(1)
!QUOTA,REGULAR,NEW_YORK,1 }
{ XQUOTA_CHI:
!IF QCITY(2)
!QUOTA,REGULAR,CHICAGO,1 }
{ XQUOTA_ATL:
!IF QCITY(3)
!QUOTA,REGULAR,ATLANTA,1 }
{ XQUOTA_SF:
!IF QCITY(4)
!QUOTA,REGULAR,SAN_FRANCISCO,1 }

~END

The TRIPLE_QUOTAS header option causes the quota names .R and .T quotas to be made. The TARGET commands set the initial target value for the .T quota. It is not necessary if you want to set these yourself using QUOTAMOD or SURVSUPR. The target quota can also be changed at any point after this. With this scheme, you would not want to ever change the quota value, just the .R and .T quota values. You also do not have to recompile your questionnaire to change target quota values this way.

You cannot use the same QUO file if you have compiled with Triplequotas on and try to recompile with Triplequotas off (or vice versa).

The TRIPLE_QUOTAS keyword “Modify_targets_only” when put questionnaire header, will only allow interactive modification of the TARGET values, not the actual quota values or resettable quota values. This will keep supervisors from mistakenly changing the actual counts on a job.

The syntax is:

Triple_quotas=modify_targets_only

NOTE: Use the “RESET” command in QUOTAMOD to reset the resettable quotas when this command is in effect.

Using SET_QUOTAS

Sometimes you want the capability of TRIPLEQUOTAS mode, but don’t want every quota to be in this mode, since every quota now becomes three quotas. You can get around this by using the SET_QUOTA compiler command. This command lets you set the value for quotas individually, so some quotas can be in single quota mode, others can be in double mode, and still others can be in triplequotas mode. The SET_QUOTA compiler directive will not assign the value if that quota name already exists and has a value. You can use the OVERRIDE option so that it will always reset the value back to this setting every time you compile.

You do not need (and do not want) TRIPLE_QUOTAS on your header statement. You can call the pieces of the quotas anything you want; you are not restricted to name.R or name.T.

EXAMPLE:

''Define the quota targets using whatever names you want following the naming scheme rules
{ XSET_MALES:
!SET_QUOTA MALES.TAR=50 }
{ XSET_FEMALES:
!SET_QUOTA FEMALES.TAR=75 }

''Set up a question to choose the gender for the quotas
{ QGENDER:
Indicate gender of respondent
!FIELD
1 Male
2 Female }

''Check to see if the quota is not full and continue
{ XGOTO:
!IF (QGENDER(1) AND QUOTA(MALES)<QUOTA(MALES.TAR)) OR &
(QGENDER(2) AND QUOTA(FEMALES)<QUOTA(FEMALES.TAR))
!GOTO,QINTERVIEW }

''Display quota that is full
{ XDISP:
Thank the respondent and report that the \:QGENDER: QUOTA is FULL.
!DISPLAY }

''Terminate, don't do the interview
{ XQUOTA:
!QUOTA,REGULAR,OVER_QUOTA,1,NOW }
{ XSPCB:
!SPECIAL,ABORT_INTERVIEW }

{ QINTERVIEW: 
!GOTO }

BODY OF QUESTIONNAIRE

''Update quotas at the end of the interview
{ XQUOTAM:
!IF QGENDER(1) AND QUOTA(MALES)<QUOTA(MALES.TAR))
!QUOTA,REGULAR,MALES,1 }

{ XQUOTAF:
!IF QGENDER(2) AND QUOTA(FEMALES)<QUOTA(FEMALES.TAR))
!QUOTA,REGULAR,FEMALES,1 }

~END