treatment "realEffort.ztt"{ background{ table zahlenAntworten{ lifetime = PERIOD; execute = WITHFIRST; } table TNantworten{ lifetime = PERIOD; execute = WITHEACH; } table zahlenEffort{ lifetime = PERIOD; execute = WITHFIRST; } table globals{ } table subjects{ } table summary{ } table contracts{ } table session{ } table logfile{ } numsubjects = 1; numgroups = 1; numpracticeperiods = 0; numactualperiods = 1; exchangerate = 0.025; startendowment = 0; showupfee = 2.5; noAutoscope = TRUE; v2IntegerVars = TRUE; v2BooleanVars = TRUE; firstBoxesOnTop = FALSE; showupfeeawaytext = "Sie haben Verlust gemacht. Wollen Sie das Startgeld einsetzen, um diesen Verlust zu decken?"; showupfeeawayyestext = "Ja"; showupfeeawaynotext = "Nein"; moneyawaytext = "Sie haben Verlust gemacht. Wollen Sie weiterfahren?"; moneyawayyestext = "Ja"; moneyawaynotext = "Nein"; bancruptwaittext = "Bitte warten Sie bis Ihr Computer wieder freigegeben wird."; program{ table = globals; do{ /* SETTINGS AND PARAMETERS - check before every run */ Demo = 0; // 0 = Demo-mode off; 1 = On = automatically exit and fill with random data // Effort-Stages ecu_per_correct_task = 1; // payment in ECU per correct solved task ecu_per_wrong_task = 0; // possibility to punish participants for wrong task (in ECU) effort_build_wealth = 200; // ecu that have to be gained as defined wealth (divided through ecu_per_correct tasks gives number ob tasks) } } program{ table = globals; do{ /* write all possibles Answers to zahlenAntworten table - otherwise we have to enter all numbers at button-line in effort stages */ iterator(lm, 0, 25).do{ zahlenAntworten.new{lm=:lm;} } } } program{ table = globals; do{ /* define random numbers which the participants have to count during effort stages */ iterator( aufgabe, 1000).do { grenze=random()*0.6+0.2; // random probability, see diploma thesis iterator( x, 5).do { iterator( y, 5).do { wert=if(random() < ::grenze, 0, 1); zahlenEffort.new{ aufgabe=:::aufgabe; x=::x; y=:y; wert=:wert; } } } } } } screen action{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; headerbox "Header"{ hasframe = TRUE; height = 10%; top = 0p; cuttop = TRUE; showPeriods = FALSE; showNumPeriods = FALSE; showtime = TRUE; timestr = "Verbleibende Zeit [sec]:"; pleasedecidetext = "Bitte entscheiden Sie sich jetzt!"; } } screen wait{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; standardbox "Text"{ hasframe = TRUE; buttonposition = BOTTOMRIGHT; buttonsequence = HORIZONTAL; item{ label = "{\\rtf \\fs30 \\qc Bitte warten Sie, bis das Experiment weitergeht.}"; } } } } stage "Count_Numbers"{ startwaitforall = TRUE; singleentry = FALSE; singleentrycontinuation = FALSE; timeouttype = never; timeout = 30; program{ table = subjects; do{ // Define Variables einsen = -1; // Inputvariable richtig = 0; // Anzahl korrekt geloest falsch = 0; // Anzahl falsch geloester currentAufgabe = 1; // gerade bearbeitete Aufgabe fertig = 0; // indicates if subject is ready with stage alleFertig = 0; // indicates if all subjects are ready // remember Starting time, so that the needed time for the stage can be measured TNantworten.new{ Subject = :Subject; currentAufgabe = 0; einsen = -1; zeit = gettime(); stufe=1; } } } program{ table = subjects; do{ if (:Demo==1) { later(15) do {richtig=200; fertig=1;} later(30) do {alleFertig=1; LeaveStage=1;} } } } screen action{ usesbg = FALSE; withalertscreen = FALSE; noalertscreen = TRUE; helpbox "Help"{ hasframe = TRUE; width = 100%; height = 10%; left = 10%; right = 10%; top = 0%; bottom = 90%; displaycondition = fertig == 0; label = "Hilfe "; help = "Bitte zählen Sie die Anzahl der Einsen in der 5x5-Matrix. Klicken Sie anschließend auf die gelbe Fläche, deren Zahl der Anzahl der Einsen in der Tabelle entspricht. Anschließend erhalten Sie eine neue Aufgabe mit neuen Zahlen. Die noch zu lösenden Aufgaben werden unten angezeigt. Wenn Sie vor den anderen Teilnehmern fertig sind, können Sie in der Wartezeit im Internet surfen."; } plotbox "Zahlen"{ hasframe = TRUE; width = 30%; height = 40%; left = 35%; right = 35%; top = 20%; bottom = 40%; displaycondition = fertig == 0; maintainaspectratio = FALSE; xaxistype = LINEAR; yaxistype = LINEAR; xleft = .5; xright = 5.5; ybottom = 5.2; ytop = .5; plotgraph ""{ table = zahlenEffort; condition = TRUE; filltoxaxis = FALSE; connecttopreviouspoint = FALSE; plottext "Zahl"{ displaycondition = aufgabe==:currentAufgabe; text = "<>"; x = x; y = y; horizontalalignment = LEFT; verticalalignment = FIRSTLINE; textcolor = rgb(0,0,0); bold = TRUE; fontsize = 20; } } } plotbox "Eingabe"{ hasframe = FALSE; width = 90%; height = 20%; left = 5%; right = 5%; top = 65%; bottom = 15%; displaycondition = fertig == 0; maintainaspectratio = FALSE; xaxistype = LINEAR; yaxistype = LINEAR; xleft = -1; xright = 13; ybottom = -1.2; ytop = 1.2; plotgraph ""{ table = zahlenAntworten; condition = TRUE; filltoxaxis = FALSE; connecttopreviouspoint = FALSE; plotrect ""{ displaycondition = lm<=12; top = 1.1; left = lm-.4; bottom = .1; right = lm+.4; linecolor = rgb(1.00,1.00,0.00); fillcolor = rgb(1.00,1.00,0.00); } plotrect ""{ displaycondition = lm<=12; top = -.1; left = lm-.4; bottom = -1.1; right = lm+.4; linecolor = rgb(1.00,1.00,0.00); fillcolor = rgb(1.00,1.00,0.00); } plottext "lm"{ displaycondition = lm <=12; text = "<>"; x = lm; y = .6; horizontalalignment = CENTER; verticalalignment = CENTER; textcolor = rgb(0.00,0.00,0.00); bold = TRUE; fontsize = 20; } plottext "lm"{ displaycondition = lm>=13; text = "<>"; x = lm-13; y = -.6; horizontalalignment = CENTER; verticalalignment = CENTER; textcolor = rgb(0.00,0.00,0.00); bold = TRUE; fontsize = 20; } plotinput ""{ event = LEFTCLICK; key = " "; action = SELECT; table = contracts; xvariable = inputx; yvariable = inputy; leavestage = FALSE; program{ table = subjects; do{ // Pruefen, ob Zahl oder Rand geklickt wurde (darf mit x nur 0.4 von einer ganzen Zahl abweichen und darf mit y nur zwischen abs(.1) und abs(1.1) liegen if ((mod(inputx, 1) > .6 | mod(inputx, 1) < .4) & (abs(inputy) > .1 & abs(inputy)< 1.1)) { // die angeklickte Zahl berechnen if (inputy > 0) { einsen = round(inputx, 1); // erste Zeile } else { einsen = round(inputx, 1) + 13; // zweite Zeile } // die richtige Antwort berechnen summe = zahlenEffort.sum(aufgabe==:currentAufgabe, wert); // auswerten, ob Antwort richtig oder falsch war if (summe == einsen) { richtig = richtig + 1; } else { falsch = falsch + 1; } // Antwort protokollieren TNantworten.new{ Subject = :Subject; currentAufgabe = :currentAufgabe; einsen = :einsen; summe = :summe; zeit = gettime(); stufe=1; } // die gerade bearbeitete Aufgabe um eins erhoehen currentAufgabe = currentAufgabe + 1; // wenn 1001. Aufgabe erreicht, wieder auf 1 zuruecksetzen (es gibt nur 1000 Aufgaben) if ( currentAufgabe > 1000 ) { currentAufgabe = 1; } // einsen wieder loeschen einsen = -1; } } } program{ table = subjects; do{ if ( :effort_build_wealth + :ecu_per_wrong_task * falsch <= :ecu_per_correct_task * richtig ) { fertig = 1; NeededTimeForWealthBuilding = gettime() - TNantworten.find(and(same(Subject), einsen==-1), zeit); CorrectInWealthBuilding = richtig; WrongInWealthBuilding = falsch; LeaveStage=1; } } } } } } standardbox "Standard"{ hasframe = FALSE; width = 90%; height = 10%; left = 5%; right = 5%; top = 85%; bottom = 5%; displaycondition = fertig == 0; buttonposition = BOTTOMRIGHT; buttonsequence = HORIZONTAL; item{ label = "{\\rtf \\fs30 \\qc Noch zu lösende Aufgaben:}"; variable = :effort_build_wealth + :ecu_per_wrong_task * falsch - :ecu_per_correct_task * richtig; format = "1"; input = FALSE; } } } screen wait{ usesbg = TRUE; withalertscreen = FALSE; noalertscreen = FALSE; } } roles{ role "S 1"{ } } period "1"{ subject 1{ group = 1; } } }