[Economics] What are the advantages using Otree to progam economic experiments?

Solution 1:

One irreducible advantage of oTree over z-Tree is that you can easily reuse/imply the entire trajectories of results per entity (session/group/player) when doing repeated games. With z-Tree, it is rather complicated (not to say impossible?) to define dynamically temporal- or individual-based autocorrelated/interdependent/recursive games.

Another notable advantage is that you can also easily run (fully automated) functional tests with oTree, be them headless or not, with random numbers following the distribution(s) or mechanism(s) you like, up to the generation of the final results, which is at best complicated if I remember well with z-Tree. Moreover, keeping in mind that it is increasingly mandatory to provide (in appendix) all the screenshots of the steps of an experiment, you can easily do so with oTree, using libraries such as Selenium as soon as something changes.I remember me doing all that manually, with many zLeafs opened, which was cumbersome to say the least. Having 3 screens was not enough...

Finally, learning oTree will strongly initiate your familiarity with a notorious web-framework, Django (not the CMS), which means that learning oTree means learning it as well. Entirely class-based and PEP8-compliant, it also means that via oTree, you will learn coding in Python the "right way". Moreover, if you wanna tweak your frontend, you will also start learning things such as CSS, HTML and even JavaScript. oTree's dividends are numerous.All that with a concrete goal in mind, which (to me) is the best manner to acquire new skills.

That being explained, there is now a new version of z-Tree which I do not know, i.e. z-Tree unleashed which may be far better than its ancestor.


Solution 2:

The main advantage of oTree is that it works for both offline and online experiments. In contrast, zTree must be run offline. So oTree is more flexible. Even if your current experiment will be run in the lab, you might value this flexibility if you think you might run online experiments in the future.

The main disadvantage is that oTree can be harder to learn. Though obviously, this will depend on your current level of Python experience.

Another consideration is whether you know anybody who can help you learn either zTree or oTree. Perhaps I am not a natural programmer, but I would have found learning how to use oTree by myself pretty difficult.