Randomization of choices

Hi, is possible to record the choice order after randomization is performed?

Hi @gerald.rexhepi
welcome to the forum! Please introduce yourself here!
could you clarify what exactly you want to achieve?

Hello, thanks for the reply.
I need to do a choice randomization (using randomized=true), but the issue is that the client is asking to extract information about choice orders during the randomization. They want to see what was the combination displayed and in the end they want to know how many times each combination appears for 1000 interviews.
Thanks in advance!

Ahh ok now I see but it's not possible, choices are randomized in the mobile app. As a workaround you can maybe add a file question and ask your enumerators to take a screenshot and attach it.

Mmm I understand, my last question on randomized choices is:
Can we fix the Not applicable and the Refusal choices always in the end meanwhile the other ones randomize?

Thank you

No, if you randomize choices all the choices will be randomized.

1 Like

The seeded variant of the randomize function is intended to let you reproduce the order. I see now that the documentation at https://docs.getodk.org/form-operators-functions/#randomize is not specific enough so we should add some details from https://getodk.github.io/xforms-spec/#fn:randomize. In particular, the algorithm used is the inside-out variant of the Fisher-Yates algorithm.

There are different approaches you could take to use this information. How many different choices do you have? If it's a small number of choices, this means the number of combinations is also relatively small. What I might do in that case is use a small form to identify seeds that give me each desired combination, make a list of those seeds for my real form, and have the real form randomly pick one of the seeds.

If you have a lot of choices and some software development capacity, you could randomly generate a seed in a calculate, pass it into randomize, and then in analysis, generate the choice order from the seeds.

:star_struck: brilliant!

Thanks for your reply, I would really appreciate if you give me a solution on randomizing a group of questions as well (pure randomization/ not given scenarios).

Thanks in advance!

This is not currently possible in the general case in ODK Collect [however, it you are using Enketo for filling in the form then I can share a solution that will work].

1 Like

Can you please give me an example how works in Enketo?