from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) author = 'Krishna Srinivasan' doc = """ This app is the website regression database Created by Krishna Srinivasan, PhD Student, University of Zurich, krishna.srinivasan@econ.uzh.ch """ class Constants(BaseConstants): name_in_url = 'main' players_per_group = None num_rounds = 5 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): #A level = models.IntegerField( label='How would you describe your current level of knowledge \ in Econometrics or Statistics?', widget=widgets.RadioSelect, choices=[ [1, 'Novice'], [2, 'Intermediate'] ] ) #A.1 field = models.IntegerField( label='What do you need a recommendation for?', widget=widgets.RadioSelect, choices=[ [1, 'For my bachelor\'s project/thesis'], [2, 'For my master\'s project/thesis'], [3, 'For my PhD project/thesis'], [4, 'For my work as a research assistant'], [5, 'For my research paper in academia'], [6, 'For my project in a non-profit organization'], [7, 'For my project at a company'], [8, 'I am just curious'], ] ) #B data = models.IntegerField( label='What type of Data do you have?', widget=widgets.RadioSelect, blank = True, choices=[ [1, 'Cross section'], [2, 'Time series'], [3, 'Pooled cross section'], [4, 'Panel data'] ], ) #C depnum = models.IntegerField( label='How many dependent variables do you have?', widget=widgets.RadioSelect, blank = True, choices=[ [1, 'One'], [2, 'Two or more'] ] ) #D deptype = models.IntegerField( label='What is the type of your dependent variable?', widget=widgets.RadioSelect, blank = True, choices=[ [1, 'Binary'], [2, 'Categorical'], [3, 'Ordered'], [4, 'Count'], [5, 'Continuous'] ], ) startover = models.BooleanField() feedscale = models.PositiveIntegerField( label='How helpful (1=Not at all helpful, 5= Very helpful) \ was the recommendation?', blank=True, widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5] ) feedtext = models.StringField( label='Any other feedback would be greatly valuable', blank=True ) # Set player variables into participant variables def set_payoff(self): self.startover = self.participant.vars['startover']