Randomised control trial (RCT) for behavioural field experiment

What is the problem?

Behavioural sciences are becoming more popular in developing countries. The method of choice are randomised contol trials (RCTs) that involve respondents to make a choice based on a presented stimuli (e.g picture, framed message, sound etc.)
I have not found a good solution to randomise stimuli that can then be presented to interviewees. I know that one could draw a random number from an uniform distribution, but this is problematic: the sample sizes of each condition would not be equal (especially for smaller samples).

Anything else we should know or have?

I think there could be an easy solution to this. I have however not found a feature in XLS that does it.

It would work with a function that draws one value (e.g. "3") out of a vector/"urn" (e.g [1,2,3,4]) without replacement. So next time the code is run on the device there are just three numbers in the vector/"urn" to draw from (e.g [1,2,4]). As soon as the vector/"urn" is empty it is refilled with all values. This would require the vector to be safed and adapted over interview sessions.

I don't know of any of the XLSForm based tools that keep state between form sessions. If that's the requirement, then your best option is to use some external app. https://github.com/opendatakit/counter is an example of such an app.

I see. Do you know of an app that has the functionality as I described it above. As I understand, the counter just adds or substracts a number, but does not draw randomly from a vektor

I just sent you a PM, I'm sure our Real-Time Survey platform can handle it.