Randomize a set of questions with multiple languages

Hello,

I would like to randomize a set of questions. I have succesfully randomized a set of questions assuming my questionnaire only has one language (English). Unfortunately, I have multiple languages and I am not able to adjust my macro to display the language of interivew.

I assume this is party due to the fact that the randomization macro is an array of text (the questions to be randomized). Is there a way to condition the text to be randomized on the language of the interview?

I appreciate all your help on this!

Luis

How can I expand on this so that the randomization displays the correct language of the interview?

Luis, if you’ve already randomized a set of questions, could you simply create multiple language translations for those questions? This would make it so that your random questions could be displayed in the respondent’s desired language of administration. Read more here on how to add translations.

Hi Arthur,

Thanks for your response. Unfortunately I cannot do that. The macro that is used to randomize requires an array of text or numbers to randomize. I am unable to insert an array composed of the question numbers into the macro. If I could, then the multiple translations would work. In this case, since it is an array of text, it will always randomize in the language that is inserted in the macro.

Hope it makes sense.

Thank you!

Luis

Lois, by any chance, are all of your questions Yes/No ? Sergiy

Luis, could you help me better understand your setup?

  • Do have a question whose text is populated by a random selection from an array of question text (e.g., choose from {“Are your eyes blue?”, “Are your eyes green?”, “Are your eyes brown?” })?
  • Or do you have a set of questions, a random set of which are enabled (e.g., q1, q2, q3, q4, and q2 and q3 are enables)?
  • Or something else?

Luis,

I have updated the public example with a new section that demonstrates a trick you can apply to randomize the questions without the use of a macro.

See “Public example Randomizing order of questions” section “Random questions order”.

Best, Sergiy

1 Like

Hi Arthur,

My example would be similar to that in the public example for randomizing the order of questions:

var r = Math.Log(1 + Math.Floor(Quest.IRnd()*1000000)/1000000);
var s = r.ToString(“0.0000000000”).Substring(2);
var items = new[]{
“How satisfied are you with room service?”,
“How satisfied are you with amenities?”,
“How satisfied are you with cleanliness?”,
“How satisfied are you with location?”,
“How satisfied are you with food?”,
“How satisfied are you with staff?”,
“How satisfied are you with booking experience?”};

for (var i = 0; i < items.Length; i++)
{
    var n = Convert.ToInt32(s.Substring(i,1));
    if (n >= items.Length) n = 0;
    var t = items[i];
    items[i] = items[n];
    items[n] = t;
}

return items

In my case, I would like for the randomization to happen across multiple languages (>5). Unfortunately, I am not able to insert the question numbers in the macro so the translations are displayed during randomization.

Thank you!

Hi Sergiy,

Thank you very much for this suggestion. In some cases, I will be able to reformulate my questions to captures yes/no (and randomize using this suggestion) ; in other cases, there are more than 5 response options so this will not be applicable. Thank you for helping on this.

Luis

Luis,

If we think of implementing a functionality to address your problem, it would be useful to us to have some examples of how other CAPI systems solve similar problems. Could you refer us to any such system?

Thanks much,

Misha

Luis, this may already be clear, but for the questions with yes/no answers, you can upload translations for each language of administration. That way, for those questions, you can both randomize questions and have questions be in a the respondent’s desired language.

For the case of questions with multiple answer options, I defer to Sergiy and others for a solution–if there is one.

Hi Misha,

Thank you for all your help to resolve this issue Unfortunately, I do not have an example from another CAPI system. If I do happen to come across one, I will post more information on here.

Thanks again!

Luis