oTree Forum >

Randomizing app sequence

#1 by Sahar

Hello,
I would like to randomize some of my apps in between of all apps. For example, for one participant ["Intro", "a", "b", "c", "d", "End"] should be the app sequence and for another one ["Intro", "b", "c", "d", "a", "End"] and so on. I have created multiple session configs in setting.py and also different sessions in demo. The problem is that, when I want to run the experiment in a room which session should be added to the room? I could not add all of them into one room. Is it possible? Did I do it wrongly? Are you aware of any other ways to randomize some of the app sequences in between?

Best,
Sahar

#2 by Victor

Hi Sahar,

I may have an idea on how to make this work (if you dont want to merge apps and randomize within apps). 

1) create a treatment allocation app that all go through at the start.
2) use it to assign treatments (with each possible app sequence) to participants and store it in a participant variable.
3) after some welcome screen in this app use the after this page technique to send them to their first app based on the participant variable. See here: https://otree.readthedocs.io/en/latest/pages.html?highlight=Skip%20apps#app-after-this-page
4) at the end of each following app, you just need to check which treatment they are in to know where to send them using the same after this page technique.

Not sure whether this is a desirable way or someone knows an easier way. id probably merge apps myself. But perhaps it works xD.

Good luck.

Victor

#3 by Chris_oTree

Note, app_after_this_page can only take you forward in the app_sequence, not backward.

Write a reply

Set forum username