from otree.api import * c = cu doc = '' class C(BaseConstants): NAME_IN_URL = 'Survey' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): Question_1 = models.IntegerField(label='What is your age?', max=50, min=18) Question_2 = models.StringField(choices=[['Micro', 'Micro'], ['Macro', 'Macro'], ['Econometrics', 'Econometrics']], label='What is your primary interest in economics?') Question_3 = models.StringField(choices=[['The president of the United States and his advisors ', 'The president of the United States and his advisors '], ['The U.S. Treasury ', 'The U.S. Treasury '], ['The Federal Open Market Committee (part of the Federal Reserve or Fed)', 'The Federal Open Market Committee (part of the Federal Reserve or Fed)'], ['The U.S. Senate and House of Representatives ', 'The U.S. Senate and House of Representatives '], ['The CEOs of the largest U.S. banks ', 'The CEOs of the largest U.S. banks '], ['Other', 'Other'], ["Don't know", "Don't know"]], label='Eight times a year a group of people meets to set the basic interest rate level in the United States. Who do you think comprises this group?') Question_4 = models.FloatField(label='What do you think is the current official unemployment rate in the U.S.?', max=100, min=0) Question_5 = models.FloatField(label='What do you think the official unemployment rate will be 12 months from now in the U.S.?', max=100, min=0) Question_6 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7']], label='How confident are you in these answers? (1 = "not confident at all", 7 = "completely confident")') Question_7 = models.FloatField(label='The Federal Reserve is responsible for monetary policy in the U.S., which includes, among other things, achieving a stable target for inflation over longer time periods. What is your best guess about the annual inflation rate that the Federal Reserve tries to achieve on average over longer time periods?', max=100, min=-100) Question_8 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7']], label='How confident are you in this answer? (1 = "not confident at all", 7 = "completely confident")') Question_9 = models.FloatField(label='Over the last 12 months, my best guess is that the rate of inflation/deflation was:', max=100, min=-100) Question_10 = models.FloatField(label='Over the next 12 months, my best guess is that the rate of inflation/deflation will be: ', max=100, min=-100) Question_11 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7']], label='How confident are you in this answer? (1 = "not confident at all", 7 = "completely confident")') Question_12 = models.StringField(choices=[['Yes ', 'Yes '], ['No', 'No']], label='Did you know the member you saw in the picture before?') Question_13 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7']], label='How much do you trust the Fed to adequately manage inflation and unemployment?(1 = "not trust at all", 7 = "completely trust")') Question_14 = models.StringField(choices=[['1', '1'], ['2', '2'], ['3', '3'], ['4', '4'], ['5', '5'], ['6', '6'], ['7', '7']], label='And how much do you trust the Fed to care about the economic well-being of all Americans?(1 = "not trust at all", 7 = "completely trust")') Question_15_1 = models.IntegerField(label='a) the unemployment rate will be 10% or higher: ', max=100, min=0) Question_15_2 = models.IntegerField(label='b) the unemployment rate will be between 7.5% and 10%:', max=100, min=0) Question_15_3 = models.IntegerField(label='c) the unemployment rate will be between 5% and 7.5%:', max=100, min=0) Question_15_4 = models.IntegerField(label='d) the unemployment rate will be between 2.5% and 5%:', max=100, min=0) Question_15_5 = models.IntegerField(label='e) the unemployment rate will be between 0% and 2.5%:', max=100, min=0) Question_16_1 = models.IntegerField(label='a) the rate of inflation will be 10% or more:', max=100, min=0) Question_16_2 = models.IntegerField(label='b) the rate of inflation will be between 6% and 10%:', max=100, min=0) Question_16_3 = models.IntegerField(label='c) the rate of inflation will be between 4% and 6%:', max=100, min=0) Question_16_4 = models.IntegerField(label='d) the rate of inflation will be between 2% and 4%:', max=100, min=0) Question_16_5 = models.IntegerField(label='e) the rate of inflation will be between 0% and 2%:', max=100, min=0) Question_16_6 = models.IntegerField(label='f) the rate of deflation (opposite of inflation) will be between 0% and 2%:', max=100, min=0) Question_16_7 = models.IntegerField(label='g) the rate of deflation (opposite of inflation) will be between 2% and 4%:', max=100, min=0) Question_16_8 = models.IntegerField(label='h) the rate of deflation (opposite of inflation) will be between 4% and 6%:', max=100, min=0) Question_16_9 = models.IntegerField(label='i) the rate of deflation (opposite of inflation) will be between 6% and 10%:', max=100, min=0) Question_16_10 = models.IntegerField(label='j) the rate of deflation (opposite of inflation) will 10% or more:', max=100, min=0) Question_17 = models.StringField(choices=[['Male ', 'Male '], ['Female ', 'Female '], ['Other', 'Other']], label='What is your gender?') Question_18 = models.StringField(choices=[['American Indian or Alaska Native ', 'American Indian or Alaska Native '], ['Asian ', 'Asian '], ['Black or African American ', 'Black or African American '], ['Native Hawaiian or Other Pacific Islander ', 'Native Hawaiian or Other Pacific Islander '], ['White', 'White']], label='Please select which of the below is more closer to identify your ethnicity?') Question_19 = models.StringField(choices=[['Michael Barr', 'Michael Barr'], ['Philip Jefferson', 'Philip Jefferson'], ['Lael Brainard ', 'Lael Brainard '], ['Lisa Cook', 'Lisa Cook']], label='Earlier in the survey, we showed you a picture related to the Federal Reserve. Do you remember who was in the picture?') def custom_export(players): yield ['participant_code', 'id_in_group'] for p in players: pp = p.participant yield [pp.code, p.id_in_group] class Explanation_Page_1(Page): form_model = 'player' class Page_1(Page): form_model = 'player' form_fields = ['Question_1', 'Question_2', 'Question_3', 'Question_4', 'Question_5', 'Question_6', 'Question_7', 'Question_8', 'Question_9', 'Question_10', 'Question_11'] class Explanation_Page_2(Page): form_model = 'player' class Treatment_1(Page): form_model = 'player' class Treatment_2(Page): form_model = 'player' class Page_2(Page): form_model = 'player' form_fields = ['Question_12', 'Question_13', 'Question_14', 'Question_15_1', 'Question_15_2', 'Question_15_3', 'Question_15_4', 'Question_15_5', 'Question_16_1', 'Question_16_2', 'Question_16_3', 'Question_16_4', 'Question_16_5', 'Question_16_6', 'Question_16_7', 'Question_16_8', 'Question_16_9', 'Question_16_10'] class Page_3(Page): form_model = 'player' form_fields = ['Question_17', 'Question_18', 'Question_19'] page_sequence = [Explanation_Page_1, Page_1, Explanation_Page_2, Treatment_1, Treatment_2, Page_2, Page_3]