Terminate an interview

When we create surveys our aim is to collect valid answers on a particular subject from a valid respondent. We are not actually interested in some respondents answers because they might not fit the profile of the survey. For example if we were running a survey on women’s makeup we would not really want any men to fill in the survey. In this article we will see some ways in which the survey can be terminated so that we do not waste peoples time answering questions that are not really for them.

So if we take our example above and say we have a survey about women’s makeup , but the link to the survey is on a website that anyone can click on we will need to try and filter out men from doing the survey. First off let’s look at some metadata

Metadata(en-AU, Question, label)

Q1 "How did you find your way to our website?" categorical [1]
    {
    	SearchEngine,Magazine,Television,Paper,Friend
    };

Q2 "Please specify your Gender" categorical [1]
{
Male,Female
};

Q3 "Thank you for telling us how you found our website. Enjoy the rest of your day." info;

Q4 "Hi , Do you have time to answer a few more questions ?" categorical [1] {
Yes,No
};

Q5 "Which types products do you use" categorical [1..] {
Lipstick,Foundation,FaceCreams,HairSpray
};

Q6 "Thank you for your time today." info;

Q7 "Thank you for telling us what products you use. Have a nice day." info;

End Metadata

The first method we are going to use to terminate the interviews is just basic routing and the exit command. In your routing section type the following.

Routing(Web)

Q1.Ask()
Q2.Ask()
If Q2 = {Male} Then Goto ScreenOutMales

Q4.ask()
If Q4 = {Yes} Then Goto ScreenOutFemales

Q5.ask()
Q7.Ask()

Exit

ScreenOutMales:
	Q3.Ask()
	Exit

ScreenOutFemales:
	Q6.Ask()
	Exit

End Routing

So as you can see we ask the first question that is discovering info as to how the respondent found our website, next we ask the gender question and if we get respondents clicking that they are male we politely say thank you and terminate the survey with the exit command. We also have another exit command in the script that terminates the interview if the respondent does not have time to answer our questions.

Another way to do this type of thing is to use IOM.Terminate. IOM terminate takes the following structure.

IOM.Terminate(Value, True, Value)

The first value that we have to pass in is the signal. A signal is a signal value to be passed to sample management indicating the reason for the termination (see “Signals” later in this topic). If the project does not use sample management you can omit this parameter and a default setting of zero will be used instead. If you omit the signal and the project uses sample management, a signal of 1 (completed interview) or 2 (stopped interview) will be passed depending on the value of Status.

IOM VALUE DESCRIPTION
Signals.sigCompleted 1 A completed interview. The respondent has answered all applicable questions.
Signals.sigStopped 2 Interview stopped by the respondent clicking Stop or by a statement in the interview script.
Signals.sigError 4 Interview terminated due to an error in the script. See Writing Your Own Error Handler for an example of how to use this signal.
Signals.sigOverQuota 5 Interview terminated by quota control. This happens when all the quota cells that a respondent belongs in are full.
Signals.sigEarlyComplete 6 An interview that should be treated as a completed interview even though the respondent may not have answered all applicable questions. You might decide to flag interviews in this way if respondents have completed at least 80% of the survey.

The second value at present just needs to be set to true. What this is saying is save all unsaved data. In future releases of Data Collection it will be possible to set this to false so any unsaved data will not be saved.

The third value is the Interview Termination Status. The interview status code defines the outcome of the interview from the perspective of the interviewing program. Possible values are defined in the TerminateStatus type definition and are as follows:

TerminateStatus.tsCompleted The interview completed.
TerminateStatus.tsScriptStopped The interview stopped for some reason before it could be completed.

So what would the code look like to use this feature,

Routing(Web1)

Q1.Ask()

Q2.Ask()

If Q2 = {Male} Then 
    Q3.Ask()
    IOM.Terminate(Signals.sigEarlyComplete, True, TerminateStatus.tsCompleted)
End If

Q4.ask()

If Q4 = {Yes} Then 
	Q6.Ask()
	IOM.Terminate(Signals.sigStopped, True, TerminateStatus.tsScriptStopped)
End If

Q5.ask()

Q7.Ask()

End Routing

As you will see when you test the code you get exactly the same visual results but the data is not marked up as completed like the EXIT command. So there you have it two ways to exit your interviews. As always if this does not help or you want more info then leave a comment and I will see how I can help.

Leave a Comment