The MX8 Research Platform uses simulated responses to test and validate the survey, and if you're working with a low incidence rate survey, then it's pretty likely that simulated responses will result in high termination rates.
Consider a survey where the fourth question is about the industry they work in, looking to filter out people who work in marketing or mobile gaming:
household_industry = s.multi_select_question(
question="Do you or anyone in your household work in any of the following sectors?",
options=[
"Market analysis and research",
"Marketing, public relations, or promotional activities",
"Video game development or publishing",
"Mobile app development or publishing",
"Social media platform or application",
"User insights or consumer research",
"Manufacturing of consumer electronics",
"Retailing of consumer electronics",
"Large-scale retail of consumer goods",
"Producing, distributing, or selling DVDs or music CDs",
"A television broadcasting network",
"Distribution of food or beverages",
"Healthcare provider",
"Financial services and insurance",
"Real estate services",
"Construction industry",
"Educational institutions and services",
"Government or public sector",
"A news or media organization"],
other_options=["None of the options listed above"],
randomize=True,
)
s.terminate_if(
any(industry in household_industry for industry in [
"Market analysis and research",
"Marketing, public relations, or promotional activities",
"Video game development or publishing",
"Mobile app development or publishing"]),
"Sorry this survey is only for people who don't work in marketing or mobile game development.",
)
When creating the simulated responses, it's pretty likely that every response is going to choose one of the forbidden industries randomly, so you end up getting an error that the subsequent results don't have ny responses.
How can we fix it?
Every question has a parameter default that can be set to specify what the simulated responses return. You can either set this to a fixed value or a random value. In our case, it's proabbly best to set it up like this, picking two random industries from the allowed list every time:
forbidden_industries = ["Market analysis and research",
"Marketing, public relations, or promotional activities",
"Video game development or publishing",
"Mobile app development or publishing"]
allowed_industries = [
"Social media platform or application",
"User insights or consumer research",
"Manufacturing of consumer electronics",
"Retailing of consumer electronics",
"Large-scale retail of consumer goods",
"Producing, distributing, or selling DVDs or music CDs",
"A television broadcasting network",
"Distribution of food or beverages",
"Healthcare provider",
"Financial services and insurance",
"Real estate services",
"Construction industry",
"Educational institutions and services",
"Government or public sector",
"A news or media organization",
]
household_industry = s.multi_select_question(
question="Do you or anyone in your household work in any of the following sectors?",
options=forbidden_industries+allowed_industries,
other_options=["None of the options listed above"],
randomize=True,
default=s.randomize(allowed_industries)[:2]
)
With these changes in place, the simulated responses work fine for this question and we get the rest of the survey running fine.
If you're working with a single select question, you can pass a list of the allowed industries:
industry = s.select_question(
question="Which sector to you work in?",
options=forbidden_industries+allowed_industries,
other_options=["None of the options listed above"],
randomize=True,
default=allowed_industries
)