from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) author = 'Huanren Zhang' doc = """ Raven's progressive matrices test measuring cognitive ability """ class Constants(BaseConstants): name_in_url = 'survey_final' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): answer = models.IntegerField(choices=[1,2,3,4,5,6,7,8]) ans_correct = models.BooleanField() #Cognitive bat = models.IntegerField( min=0, max=110) machines = models.IntegerField( min=0, max=300) lake = models.IntegerField( min=0, max=48) # Demographics age = models.IntegerField( label='What is your age?', min=13, max=125) gender = models.StringField( choices=['Male', 'Female', 'Other'], label='What is your gender?', widget=widgets.RadioSelect) city = models.StringField( label='What is your city of residency?') state = models.StringField( label='What is your state of residence?') married = models.StringField( label='What is your marital status?', choices=['Married', 'Single'], widget=widgets.RadioSelect) education = models.StringField( label = "What is your highest education level?", choices = ['Less than high school','High school', 'Some college','Undergraduate degree','Masters degree', 'Professional degree (e.g., M.D., J.D., M.B.A.)', 'Doctoral degree'], widget=widgets.RadioSelect ) employment = models.StringField( label = 'What is your employment status?', choices = ['Unemployed','Part-time employed', 'Full-time employed'], widget=widgets.RadioSelect) income = models.IntegerField( label='What is the annual income of your family in USD?', choices = ['Below $10,000','$10,000 - $50,000', '$50,000 - $100,000','Over $100,000'])