from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) from radiogrid import RadioGridField author = 'Philipp Chapkovski, chapkovski@gmail.com' doc = """ BigFive, CPT, RiskAversion, Comments""" # Big Five 10-item inventory # # Rammstedt, B., & John, O. P. (2007). Measuring personality in one minute or less: A 10-item short version of the # Big Five Inventory in English and German. Journal of research in Personality, 41(1), 203-212. # # Scoring the BFI-10 scales: # Extraversion: 1R, 6; Agreeableness: 2, 7R; Conscientiousness: 3R, 8; Neuroticism: 4R, 9; # Openness: 5R; 10 (R D item is reversed-scored). # # "In order to obtain measurement values for the individual characteristics of the interviewee # on the five personality dimensions, the answers to the two items are averaged for each dimension. # For this purpose, the item with the negative polarity is first recoded (items 1, 3, 4, 5 and 7) # and then the mean value of the recoded and the non-recoded item is calculated for each dimension. # The range of values of the five dimensions is then between 1 and 5 # (for reference values see Table 8 - Table 1 2 or Rammstedt, 2007)." # # --> an average implies dividing the sum by 2 - I added that to the code. otherwise we have a 2-10 scale instead of 1-5 # # https://www.westmont.edu/_academics/departments/psychology/documents/rammstedt_and_john.pdf # To measure personality, we use the five-factor model or the # Big Five (Goldberg, 1981; McCrae and Costa JR, 2003) class Constants(BaseConstants): name_in_url = '3' players_per_group = None num_rounds = 1 bigfive = dict(extraversion=[0, 5], agreeableness=[6, 1], conscientiousness=[2, 7], neuroticism=[3, 8], openness=[4, 9]) bigfive_categories = bigfive.keys() # humility = dict(sincerity=[4R,0, 8], # fairness=[1R,5,9R], # greedavoidance=[2,6R], # modesty=[3R,7R] # ) # humility_categories = humility.keys() # not using currently: multiplier_complete = 1.00 payment_completing_experiment = 2.70 higher_payoff_AP = 4 lower_payoff_AP = 3 #payoffs also in models.py in app2_blue and app2_red class Subsession(BaseSubsession): pass class Group(BaseGroup): pass ROWS = ( (1, " is reserved"), (2, " is generally trusting"), (3, " tends to be lazy"), (4, " is relaxed, handles stress well"), (5, " has few artistic interests"), (6, " is outgoing, sociable"), (7, " tends to find fault with others"), (8, "does a thorough job"), (9, "gets nervous easily"), (10, "has an active imagination"), ) VALUES = ( (1, "Disagree strongly"), (2, "Disagree a little"), (3, "Neither agree nor Disagree"), (4, "Agree a little"), (5, "Agree strongly"), ) ROWS_H = ( (1, "I wouldn't use flattery to get a raise or promotion at work, even if I thought it would succeed."), (2, "If I knew that I could never get caught, I would be willing to steal a million dollars."), (3, "Having a lot of money is not especially important to me."), (4, "I think that I am entitled to more respect than the average person is."), (5, "If I want something from someone, I will laugh at that person's worst jokes."), (6, "I would never accept a bribe, even if it were very large."), (7, "I would get a lot of pleasure from owning expensive luxury"), (8, " I want people to know that I am an important person of high status."), (9, "I wouldn't pretend to like someone just to get that person to do favors for me."), (10, "I'd be tempted to use counterfeit money, if I were sure I could get away with it.") ) # Authors of the HEXACO-60: # Ashton, M. C., & Lee, K. (2009). The HEXACO–60: A short measure of the major dimensions of personality. Journal of personality assessment, 91(4), 340-345. # # For Humility-Honesty 10-item: # Honesty-Humility (6 reversed): Sincerity (6, 30, 54), Fairness (12, 36, 60), Greed-Avoidance (18, 42), Modesty (24, 48) # Honesty-Humility: 6, 12R, 18, 24R, 30R, 36, 42R, 48R, 54, 60R # Please read each statement and decide how much you agree or disagree with that statement. Then indicate your response using the scale presented below: # # 5 = strongly agree # 4 = agree # 3 = neutral (neither agree nor disagree) # 2 = disagree # 1 = strongly disagree # # Please answer every statement, even if you are not completely sure of your response. # 6.I wouldn't use flattery to get a raise or promotion at work, even if I thought it would succeed. # 12R, If I knew that I could never get caught, I would be willing to steal a million dollars. # 18, Having a lot of money is not especially important to me. # 24R, I think that I am entitled to more respect than the average person is. # 30R, If I want something from someone, I will laugh at that person's worst jokes. # 36, I would never accept a bribe, even if it were very large. # 42R,I would get a lot of pleasure from owning expensive luxury # 48R, I want people to know that I am an important person of high status. # 54, I wouldn't pretend to like someone just to get that person to do favors for me. # 60R I'd be tempted to use counterfeit money, if I were sure I could get away with it. # Items indicated with R are reverse-keyed items; for these items, # responses should be reversed prior to computing scale scores: 5 to 1, 4 to 2, 3 to 3, 2 to 4, 1 to 5 # Facet scale scores (e.g. sincerity) should be computed as means across all items in facet, after recoding of reverse-keyed items. # Factor scale scores (e.g. humility) should be computed as means across all items in factor. class Player(BasePlayer): # The question was "What proportion of participants in this experiment # in position X do you think chose option Blue when Orange # was associated to higher payoffs?", with "X" being chosen at random # belief_others_first = models.IntegerField(label="what others chose in first position when in conflict with others", # min=0, # max=100, # blank=True) # belief_others_last = models.IntegerField(label="what others chose in last position when in conflict with others", # min=0, # max=100, # blank=True) bigfive = RadioGridField(rows=ROWS, values=VALUES, require_all_fields=True, verbose_name='I see myself as someone who...', ) # scale 1 to 5 -> 2 items per dimension summed up (previously recoded for the negative item) and averaged extraversion = models.FloatField() agreeableness = models.FloatField() conscientiousness = models.FloatField() neuroticism = models.FloatField() openness = models.FloatField() def conversion(self, method): i, j = Constants.bigfive[method] return (6 - int(self.bigfive[i]) + int(self.bigfive[j])) / 2 sincerity = models.DecimalField(max_digits=5, decimal_places=2) fairness = models.DecimalField(max_digits=5, decimal_places=2) greed_avoidance = models.DecimalField(max_digits=5, decimal_places=2) modesty = models.DecimalField(max_digits=5, decimal_places=2) humility_avg = models.DecimalField(max_digits=5, decimal_places=2) humility = RadioGridField(rows=ROWS_H, values=VALUES, require_all_fields=True, verbose_name='', ) def humility_calc(self): self.sincerity = (int(self.humility[0]) + int(self.humility[8]) + 6 - int(self.humility[4])) / 3 self.fairness = (int(self.humility[5]) + 6 - int(self.humility[1]) + 6 - int(self.humility[9])) / 3 self.greed_avoidance = (int(self.humility[2]) + 6 - int(self.humility[6])) / 2 self.modesty = (6 - int(self.humility[3]) + 6 - int(self.humility[7])) / 2 self.humility_avg = (int(self.humility[0]) + int(self.humility[8]) + 6 - int(self.humility[4]) \ + int(self.humility[5]) + 6 - int(self.humility[1]) + 6 - int(self.humility[9]) \ + int(self.humility[2]) + 6 - int(self.humility[6]) \ + 6 - int(self.humility[3]) + 6 - int(self.humility[7])) / 10 # self.humility_avg = (int(self.sincerity) * 3+int(self.fairness)*3+int(self.greed_avoidance)*2+int(self.modesty)*2)/10 # sincerity = [4R, 0, 8], # fairness = [1R, 5, 9R], # greedavoidance = [2, 6R], # modesty = [3R, 7R] timeout = models.IntegerField( choices=[0, 1] ) timeout_in_bigfive = models.IntegerField( choices=[0, 1] ) Follow_up_1 = models.LongStringField() Follow_up_2 = models.LongStringField() Follow_up_x = models.LongStringField() Follow_up_3=models.IntegerField(min=0, max=100 ) Follow_up_4=models.IntegerField(min=0, max=100 ) Follow_up_5=models.LongStringField( ) Follow_up_6=models.LongStringField( ) # LIA ADDED bomb_consequential = models.IntegerField() boxes_collected_consequential = models.IntegerField() bret_memory = models.CurrencyField() stars_total = models.FloatField() my_bret_payoff = models.CurrencyField() my_memory_payoff = models.CurrencyField()