Hi Chris and others,
I'm designing a study, where participants are randomly assigned to be either Player 1 or Player 2, and then Player 2 can be assigned different levels of the endowment. So we have the following structure:
- Player 1
- Player 2
- High endowment
- Mid
endowment
- Low
endowment
It seems like I know how to assign participates to be either Player 1 or Player 2, but not sure how to layer in this endowment component for Player 2. I thought maybe I could combine the
factorial treatment approach, but it doesn't seem to be the correct way to think about this:
def creating_session(subsession: Subsession):
players = subsession.get_players()
for p in players:
p.is_employee = p.id_in_group % 2 > 0
p.is_boss = p.id_in_group % == 0
import itertools
treatments = itertools.cycle(
itertools.product([50, 100, 150])
for p.is_employee in subsession.get_players():
p.endowment = next(treatments)
Thank you so much! Any guidance would mean the world to me!
Anna