from otree.api import * doc = """ Consent and payment information before the start of the experiment """ class C(BaseConstants): NAME_IN_URL = 'followup' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 INSTRUCTIONS_TEMPLATE = 'follow_up/instructions.html' PAYOFF = cu(1.2) class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): prolific_id = models.StringField( label='What is your unique Prolific ID?', ) consent = models.BooleanField( label='If you are 18 years of age or older, have read and understand the information above, and freely consent to participate in the study, please click on the "I Agree" button to begin the study.', # widget=widgets.RadioSelectHorizontal, choices=[[True, 'I agree.'], [False, 'I disagree.']], ) # Obfuscation questions overall = models.IntegerField( choices=[[1, 'Strongly increased'], [2, 'Somewhat increased'], [3, 'Kept at its present level'], [4, 'Somewhat decreased'], [5, 'Strongly decreased']], label='Do you think the overall amount of government spending should be increased, decreased, or remain the same?', widget=widgets.RadioSelect, ) tax = models.IntegerField( choices=[[1, 'Strongly increased'], [2, 'Somewhat increased'], [3, 'Kept at its present level'], [4, 'Somewhat decreased'], [5, 'Strongly decreased']], label='Do you think the overall amount of taxes raised by the government should be increased, decreased, or remain the same?', widget=widgets.RadioSelect, ) wealth_tax = models.IntegerField( choices=[[1, 'Yes, redistribute by heavy taxes on rich'], [2, 'No, should not redistribute wealth'], [3, 'No opinion']], label='People feel differently about how far a government should go. Here is a phrase which some people believe in and some don’t. Do you think the government should or should not redistribute wealth by heavy taxes on the rich?', widget=widgets.RadioSelect, ) # True questions on support for working women after obfuscation policy1 = models.IntegerField( choices=[[1, 'Strongly agree'], [2, 'Agree'], [3, 'Neither agree or disagree'], [4, 'Disagree'], [5, 'Strongly disagree']], label='Research shows that after having children, women experience a drop in labour earnings. This is often explained by the fact that, due to childcare responsibilities, they sort into jobs that offer lower wages but are more flexible and do not require long hours. Do you think that the government should offer policies such as subsidized childcare and universal childcare to help women with children work longer hours?', # (Kleven et al, AER 2019) widget=widgets.RadioSelect, ) policy2 = models.IntegerField( choices=[[1, 'Strongly agree'], [2, 'Agree'], [3, 'Neither agree or disagree'], [4, 'Disagree'], [5, 'Strongly disagree']], label='Research shows that after having children, women experience a drop in labour earnings. This is often explained by the fact that, due to childcare responsibilities, they sort into jobs that offer lower wages but are more flexible and do not require long hours. Do you think that the government should offer policies such as paternity leave to help women with children return sooner to work after the childbirth and work longer hours?', # (Kleven and co-authors, 2019) widget=widgets.RadioSelect, ) # policy3 = models.IntegerField( # choices=[[1, 'Strongly agree'], [2, 'Agree'], [3, 'Neither agree or disagree'], [4, 'Disagree'], [5, 'Strongly disagree']], # label='Research for the UK shows that early interventions such as universal childcare for pre-school children is beneficial in terms of educational achievement and labour market outcomes (Duncan and Magnugson, 2013). Do you think that the government should offer policies such as universal childcare for pre-school children that would allow women to work longer hours and at the same time benefit children?', # widget=widgets.RadioSelect, # ) # recall question recall = models.LongStringField( blank=True, label='Does this survey lead you to recall anything specific?', ) # PAGES class Introduction(Page): # timeout_seconds = 300 form_model = 'player' form_fields =['consent', 'prolific_id'] # @staticmethod # def before_next_page(player, timeout_happened): # if timeout_happened: # player.consent = 0 class DirectEnd(Page): @staticmethod def is_displayed(player): return player.consent == 0 class Followup(Page): form_model = 'player' form_fields = ['overall', 'tax', 'wealth_tax', 'policy1', 'policy2'] # , 'policy3' class Recall(Page): form_model = 'player' form_fields = ['recall'] class End(Page): @staticmethod def vars_for_template(player): participant = player.participant participant.payoff = cu(1.2) return dict(redemption_code=participant.label or participant.code) page_sequence = [Introduction, DirectEnd, Followup, Recall, End]