from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'after' players_per_group = None num_rounds = 1 piece_rate = 0.005 penalty_rate = 0.02 piece_rate_alt = 0.008 penalty_rate_alt = 0.32 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): interruptionsFlag = models.IntegerField() paymentSchemeFlag = models.IntegerField() showFeedbackFlag = models.IntegerField() #time timeOnPostBelief1 = models.FloatField(initial=0) timeOnPostBelief2 = models.FloatField(initial=0) timeOnFeedback1 = models.FloatField(initial=0) timeOnFeedback2 = models.FloatField(initial=0) timeOnFeedback3 = models.FloatField(initial=0) timeOnFeedback4 = models.FloatField(initial=0) timeOnFeedback5 = models.FloatField(initial=0) timeOnFeedback6 = models.FloatField(initial=0) timeOnFeedback7 = models.FloatField(initial=0) timeOnFeedback8 = models.FloatField(initial=0) timeOnFeedback9 = models.FloatField(initial=0) timeOnFeedback10 = models.FloatField(initial=0) timeOnFeedback11 = models.FloatField(initial=0) timeOnFeedback12 = models.FloatField(initial=0) timeOnFeedback13 = models.FloatField(initial=0) timeOnWTP1 = models.FloatField(initial=0) timeOnWTP2 = models.FloatField(initial=0) timeOnWTP3 = models.FloatField(initial=0) timeOnWTP4 = models.FloatField(initial=0) timeOnWTP5 = models.FloatField(initial=0) timeOnWTP6 = models.FloatField(initial=0) timeOnWTP7 = models.FloatField(initial=0) timeOnWTP8 = models.FloatField(initial=0) timeOnWTP9 = models.FloatField(initial=0) timeOnWTP10 = models.FloatField(initial=0) timeOnWTP11 = models.FloatField(initial=0) timeOnWTP12 = models.FloatField(initial=0) timeOnWTP13 = models.FloatField(initial=0) timeOnWTP14 = models.FloatField(initial=0) timeOnWTP15 = models.FloatField(initial=0) timeOnWTP16 = models.FloatField(initial=0) timeOnWTP17 = models.FloatField(initial=0) timeOnWTP18 = models.FloatField(initial=0) # earning overall earnedAmount = models.FloatField(initial=0) bonusFromPostBelief = models.FloatField(initial=0) earningFromTask = models.FloatField() chosenEarning = models.FloatField(initial=0) earningWithInterruptions = models.FloatField() earningWithoutInterruptions = models.FloatField() pullAmountFeedback = models.FloatField() pullAmountWTP = models.FloatField() # barcodes on intervals barcodesInterval1 = models.IntegerField(initial=1) barcodesInterval2 = models.IntegerField(initial=1) barcodesInterval3 = models.IntegerField(initial=1) barcodesInterval4 = models.IntegerField(initial=1) barcodesInterval5 = models.IntegerField(initial=1) barcodesInterval6 = models.IntegerField(initial=1) barcodesFirst30Mins = models.IntegerField() barcodesLast30Mins = models.IntegerField() barcodesWithInterruptions = models.FloatField() barcodesWithoutInterruptions = models.FloatField() # error rate on intervals errorRateInterval1 = models.FloatField(initial=1) errorRateInterval2 = models.FloatField(initial=1) errorRateInterval3 = models.FloatField(initial=1) errorRateInterval4 = models.FloatField(initial=1) errorRateInterval5 = models.FloatField(initial=1) errorRateInterval6 = models.FloatField(initial=1) errorRateFirst30Mins = models.FloatField() errorRateLast30Mins = models.FloatField() errorRateWithInterruptions = models.FloatField() errorRateWithoutInterruptions = models.FloatField() errorsWithInterruptions = models.FloatField() errorsWithoutInterruptions = models.FloatField() correctsWithInterruptions = models.FloatField() correctsWithoutInterruptions = models.FloatField() # POST-BELIEF PAGE 1 postbeliefp1q1 = models.FloatField( blank=False, min=0 ) postbeliefp1q2 = models.FloatField( blank=False, min=0 ) postbeliefp1q3 = models.FloatField( blank=False, min=0 ) postbeliefp1q4 = models.FloatField( blank=False, min=0 ) postbeliefp1q5 = models.FloatField( blank=False, min=0 ) postbeliefp1q6 = models.FloatField( blank=False, min=0 ) ### postbeliefp1q7 = models.FloatField( blank=False, min=0, max=100 ) postbeliefp1q8 = models.FloatField( blank=False, min=0, max=100 ) postbeliefp1q9 = models.FloatField( blank=False, min=0, max=100 ) postbeliefp1q10 = models.FloatField( blank=False, min=0, max=100 ) postbeliefp1q11 = models.FloatField( blank=False, min=0, max=100 ) postbeliefp1q12 = models.FloatField( blank=False, min=0, max=100 ) # POST-BELIEF 2 postbeliefp2q1 = models.FloatField( blank=False, min=0 ) postbeliefp2q2 = models.FloatField( blank=False, min=0 ) postbeliefp2q3 = models.FloatField( blank=False, min=0 ) postbeliefp2q4 = models.FloatField( blank=False, min=0 ) postbeliefp2q5 = models.FloatField( blank=False, min=0 ) postbeliefp2q6 = models.FloatField( blank=False, min=0 ) ### postbeliefp2q7 = models.FloatField( blank=False, min=0, max=100 ) postbeliefp2q8 = models.FloatField( blank=False, min=0, max=100 ) postbeliefp2q9 = models.FloatField( blank=False, min=0, max=100 ) postbeliefp2q10 = models.FloatField( blank=False, min=0, max=100 ) postbeliefp2q11 = models.FloatField( blank=False, min=0, max=100 ) postbeliefp2q12 = models.FloatField( blank=False, min=0, max=100 ) ### postbeliefp2q13 = models.FloatField( blank=False, min=0 ) postbeliefp2q14 = models.FloatField( blank=False, min=0 ) postbeliefp2q15 = models.FloatField( blank=False, min=0 ) postbeliefp2q16 = models.FloatField( blank=False, min=0 ) postbeliefp2q17 = models.FloatField( blank=False, min=0 ) postbeliefp2q18 = models.FloatField( blank=False, min=0 ) ### postbeliefp2q19 = models.FloatField( blank=False, min=0, max=100 ) postbeliefp2q20 = models.FloatField( blank=False, min=0, max=100 ) postbeliefp2q21 = models.FloatField( blank=False, min=0, max=100 ) postbeliefp2q22 = models.FloatField( blank=False, min=0, max=100 ) postbeliefp2q23 = models.FloatField( blank=False, min=0, max=100 ) postbeliefp2q24 = models.FloatField( blank=False, min=0, max=100 ) # feedback feedback2 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $0.05 for this feedback'], ['No', 'No, I would NOT be willing to pay $0.05 for this feedback']], widget=widgets.RadioSelect, label="", blank=False ) feedback3 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $0.15 for this feedback'], ['No', 'No, I would NOT be willing to pay $0.15 for this feedback']], widget=widgets.RadioSelect, label="", blank=False ) feedback4 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $0.25 for this feedback'], ['No', 'No, I would NOT be willing to pay $0.25 for this feedback']], widget=widgets.RadioSelect, label="", blank=False ) feedback5 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $0.50 for this feedback'], ['No', 'No, I would NOT be willing to pay $0.50 for this feedback']], widget=widgets.RadioSelect, label="", blank=False ) feedback6 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $0.75 for this feedback'], ['No', 'No, I would NOT be willing to pay $0.75 for this feedback']], widget=widgets.RadioSelect, label="", blank=False ) feedback7 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $1.0 for this feedback'], ['No', 'No, I would NOT be willing to pay $1.0 for this feedback']], widget=widgets.RadioSelect, label="", blank=False ) feedback8 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $1.5 for this feedback'], ['No', 'No, I would NOT be willing to pay $1.5 for this feedback']], widget=widgets.RadioSelect, label="", blank=False ) feedback9 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $2.0 for this feedback'], ['No', 'No, I would NOT be willing to pay $2.0 for this feedback']], widget=widgets.RadioSelect, label="", blank=False ) feedback10 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $3.0 for this feedback'], ['No', 'No, I would NOT be willing to pay $3.0 for this feedback']], widget=widgets.RadioSelect, label="", blank=False ) feedback11 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $5.0 for this feedback'], ['No', 'No, I would NOT be willing to pay $5.0 for this feedback']], widget=widgets.RadioSelect, label="", blank=False ) feedback12 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $8.0 for this feedback'], ['No', 'No, I would NOT be willing to pay $8.0 for this feedback']], widget=widgets.RadioSelect, label="", blank=False ) # wtp [0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.4, 0.5, 0.75, 1.0, 1.25, 1.5, 2.0, 3.0, 5.0, 8.0] wtp2 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $0.05 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $0.05 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) wtp3 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $0.1 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $0.1 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) wtp4 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $0.15 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $0.15 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) wtp5 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $0.2 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $0.2 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) wtp6 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $0.25 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $0.25 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) wtp7 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $0.3 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $0.3 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) wtp8 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $0.4 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $0.4 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) wtp9 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $0.5 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $0.5 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) wtp10 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $0.75 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $0.75 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) wtp11 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $1.0 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $1.0 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) wtp12 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $1.25 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $1.25 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) wtp13 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $1.5 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $1.5 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) wtp14 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $2.0 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $2.0 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) wtp15 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $3.0 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $3.0 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) wtp16 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $5.0 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $5.0 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) wtp17 = models.StringField( choices=[['Yes', 'Yes, I would be willing to pay $8.0 to not receive email interruptions'], ['No', 'No, I would NOT be willing to pay $8.0 to not receive email interruptions']], widget=widgets.RadioSelect, label="", blank=False ) fq1 = models.StringField( choices=[['Very much so', 'Very much so'], ['A little', 'A little'], ['Not really', 'Not really'], ['Not at all', 'Not at all']], label='1. Next round: want to find out whether it will be worth to pay to eliminate interruptions in the next 15 minutes of transcription work', widget=widgets.RadioSelect, blank=True ) fq2 = models.StringField( choices=[['Very much so', 'Very much so'], ['A little', 'A little'], ['Not really', 'Not really'], ['Not at all', 'Not at all']], label='2. General curiosity: want to find out how much interruptions affected my work performance', widget=widgets.RadioSelect, blank=True ) fq3 = models.StringField( choices=[['Very much so', 'Very much so'], ['A little', 'A little'], ['Not really', 'Not really'], ['Not at all', 'Not at all']], label='3. Setting: feedback about interruptions on this task not useful because too specific to this setting', widget=widgets.RadioSelect, blank=True ) fq4 = models.StringField( choices=[['Very much so', 'Very much so'], ['A little', 'A little'], ['Not really', 'Not really'], ['Not at all', 'Not at all']], label='4. Reason: 15 minutes of transcription work not enough reason to pay to find out how interruptions affected my work performance', widget=widgets.RadioSelect, blank=True ) fq5 = models.StringField( choices=[['Very much so', 'Very much so'], ['A little', 'A little'], ['Not really', 'Not really'], ['Not at all', 'Not at all']], label='5. Good understanding: already have good understanding of how interruptions affect me and my performance, so not worth paying for feedback', widget=widgets.RadioSelect, blank=True ) fq6 = models.StringField( choices=[['Next round', 'Next round'], ['General curiosity', 'General curiosity'], ['Setting', 'Setting'], ['Reason', 'Reason'], ['Good understanding', 'Good understanding'], ['Nothing: just decided at random', 'Nothing: just decided at random']], label='6. What influenced your willingness to pay the most', widget=widgets.RadioSelect, blank=True ) wq1 = models.StringField( choices=[['Very much so', 'Very much so'], ['A little', 'A little'], ['Not really', 'Not really'], ['Not at all', 'Not at all']], label='1. Impact on earnings: earn less with interruptions, so worth paying to eliminate them', widget=widgets.RadioSelect, blank=True ) wq2 = models.StringField( choices=[['Very much so', 'Very much so'], ['A little', 'A little'], ['Not really', 'Not really'], ['Not at all', 'Not at all']], label='2. Impact on effort: with interruptions need to exert more effort to have same performance, so worth paying to eliminate them', widget=widgets.RadioSelect, blank=True ) wq3 = models.StringField( choices=[['Very much so', 'Very much so'], ['A little', 'A little'], ['Not really', 'Not really'], ['Not at all', 'Not at all']], label='3. Impact on well-being: interruptions are annoying, so worth paying to eliminate them', widget=widgets.RadioSelect, blank=True ) wq4 = models.StringField( choices=[['Very much so', 'Very much so'], ['A little', 'A little'], ['Not really', 'Not really'], ['Not at all', 'Not at all']], label='4. Duration: 15 minutes not long enough for interruptions to affect me or my work performance, so not worth paying to eliminate them', widget=widgets.RadioSelect, blank=True ) wq5 = models.StringField( choices=[['Very much so', 'Very much so'], ['A little', 'A little'], ['Not really', 'Not really'], ['Not at all', 'Not at all']], label='5. Understanding of impact: not sure how interruptions are affecting me or my work performance, so not worth paying to eliminate them', widget=widgets.RadioSelect, blank=True ) wq6 = models.StringField( choices=[['Impact on earnings', 'Impact on earnings'], ['Impact on effort', 'Impact on effort'], ['Impact on well-being', 'Impact on well-being'], ['Duration', 'Duration'], ['Understanding of impact', 'Understanding of impact'], ['Nothing: just decided at random', 'Nothing: just decided at random']], label='6. What influenced your willingness to pay the most', widget=widgets.RadioSelect, blank=True )