jm560@sussex.ac.uk
|
|
Group: Forum Members
Posts: 25,
Visits: 208
|
Hi, I posted a few days ago for some help on the locations of my stimuli - https://www.millisecond.com/forums/Topic22419.aspx - which now all works perfectly so thank you! However, I am trying to use the logic of the alcohol attention bias script (the one online - http://www.millisecond.com/download/library/alcoholdotprobe/) but am having problems with the data recording. I need each trial to check if the distractor is congruent with my target stimuli (an X or an N), then keep a count of this (which i thought i had done 'on trial begin'), the accuracy and latency (which I think should be on trial end). But the data does not record this correctly. It's recording almost every trial as congruent. As it wasn't updating I changed the congruence variable to an expression (as i understand these are evaluated every time they are used?), but it made no difference. Relevant script is pasted below and whole thing is attached. I've also attached an example data file. <trial set3X1> / ontrialbegin = [ values.valid = 0; values.validcorrect = 0; values.trialcount += 1; values.category = 0] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler1.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler2.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler3.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler4.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler5.nextvalue,500);] / ontrialbegin = [values.fillerhpos1 = expressions.hp2] / ontrialbegin = [values.fillerhpos2 = expressions.hp3] / ontrialbegin = [values.fillerhpos3 = expressions.hp4] / ontrialbegin = [values.fillerhpos4 = expressions.hp5] / ontrialbegin = [values.fillerhpos5 = expressions.hp6] / ontrialbegin = [values.fillervpos1 = expressions.vp2] / ontrialbegin = [values.fillervpos2 = expressions.vp3] / ontrialbegin = [values.fillervpos3 = expressions.vp4] / ontrialbegin = [values.fillervpos4 = expressions.vp5] / ontrialbegin = [values.fillervpos5 = expressions.vp6] / ontrialbegin = [trial.set3X1.insertstimulustime(list.distractorX1.nextvalue,500);] / ontrialbegin = [values.distractor = list.distractorX1.currentvalue;] / ontrialbegin = [ if (contains(list.distractorX1.currentvalue, "X")) expressions.category = "congruent"; else if (contains(list.distractorX1.currentvalue, "N")) expressions.category = "incongruent"; ] / ontrialbegin = [ if (expressions.category= "congruent") values.count_congruent += 1; else if (expressions.category= "incongruent") values.count_incongruent += 1; ] / ontrialend = [trial.set3X1.resetstimulusframes(); ] / stimulustimes = [1=fixation; 500=sequence (fixationcover, XLD1); 600=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6)] / validresponse = ("J", "I") / correctresponse = ("J") / response = timeout(2000) / beginresponsetime = 500 / ontrialend = [ if (trial.set3X1.latency >= parameters.minimum_latency) values.valid = 1; if (values.valid == 1) { if (trial.set3X1.correct) { values.validcorrect = 1; values.sumcorrect += 1; values.sumrt += trial.set3X1.latency if (expressions.category == "congruent") { values.sumcorrect_congruent += 1; values.sumrt_congruent += trial.set3X1.latency; list.latencies_congruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } else { values.sumcorrect_incongruent += 1; values.sumrt_incongruent += trial.set3X1.latency; list.latencies_incongruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } } } ; list.accuracy.insertitem(values.validcorrect, 1); values.testeracc = list.accuracy.currentindex if (expressions.category == "congruent") { list.accuracy_congruent.insertitem(values.validcorrect, 1); } else { list.accuracy_incongruent.insertitem(values.validcorrect, 1); }; ] </trial> <expressions> /category = 0 </expressions> <parameters> / minimum_latency = 100 </parameters> <list latencies_congruent> </list> <list latencies_incongruent> </list> <list accuracy_congruent> </list> <list accuracy_incongruent> </list> <list latencies> </list> <list accuracy> </list> <values> /validcorrect = 0 /valid = 0 /sumcorrect = 0 /sumrt = 0 /sumcorrect_congruent = 0 /sumrt_congruent = 0 /sumcorrect_incongruent = 0 /sumrt_incongruent = 0 /testeracc = 0 /count_congruent = 0 /count_incongruent = 0 /trialcount = 0 </values> Thanks
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+xHi, I posted a few days ago for some help on the locations of my stimuli - https://www.millisecond.com/forums/Topic22419.aspx - which now all works perfectly so thank you! However, I am trying to use the logic of the alcohol attention bias script (the one online - http://www.millisecond.com/download/library/alcoholdotprobe/) but am having problems with the data recording. I need each trial to check if the distractor is congruent with my target stimuli (an X or an N), then keep a count of this (which i thought i had done 'on trial begin'), the accuracy and latency (which I think should be on trial end). But the data does not record this correctly. It's recording almost every trial as congruent. As it wasn't updating I changed the congruence variable to an expression (as i understand these are evaluated every time they are used?), but it made no difference. Relevant script is pasted below and whole thing is attached. I've also attached an example data file. <trial set3X1> / ontrialbegin = [ values.valid = 0; values.validcorrect = 0; values.trialcount += 1; values.category = 0] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler1.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler2.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler3.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler4.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler5.nextvalue,500);] / ontrialbegin = [values.fillerhpos1 = expressions.hp2] / ontrialbegin = [values.fillerhpos2 = expressions.hp3] / ontrialbegin = [values.fillerhpos3 = expressions.hp4] / ontrialbegin = [values.fillerhpos4 = expressions.hp5] / ontrialbegin = [values.fillerhpos5 = expressions.hp6] / ontrialbegin = [values.fillervpos1 = expressions.vp2] / ontrialbegin = [values.fillervpos2 = expressions.vp3] / ontrialbegin = [values.fillervpos3 = expressions.vp4] / ontrialbegin = [values.fillervpos4 = expressions.vp5] / ontrialbegin = [values.fillervpos5 = expressions.vp6] / ontrialbegin = [trial.set3X1.insertstimulustime(list.distractorX1.nextvalue,500);] / ontrialbegin = [values.distractor = list.distractorX1.currentvalue;] / ontrialbegin = [ if (contains(list.distractorX1.currentvalue, "X")) expressions.category = "congruent"; else if (contains(list.distractorX1.currentvalue, "N")) expressions.category = "incongruent"; ] / ontrialbegin = [ if (expressions.category= "congruent") values.count_congruent += 1; else if (expressions.category= "incongruent") values.count_incongruent += 1; ] / ontrialend = [trial.set3X1.resetstimulusframes(); ] / stimulustimes = [1=fixation; 500=sequence (fixationcover, XLD1); 600=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6)] / validresponse = ("J", "I") / correctresponse = ("J") / response = timeout(2000) / beginresponsetime = 500 / ontrialend = [ if (trial.set3X1.latency >= parameters.minimum_latency) values.valid = 1; if (values.valid == 1) { if (trial.set3X1.correct) { values.validcorrect = 1; values.sumcorrect += 1; values.sumrt += trial.set3X1.latency if (expressions.category == "congruent") { values.sumcorrect_congruent += 1; values.sumrt_congruent += trial.set3X1.latency; list.latencies_congruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } else { values.sumcorrect_incongruent += 1; values.sumrt_incongruent += trial.set3X1.latency; list.latencies_incongruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } } } ; list.accuracy.insertitem(values.validcorrect, 1); values.testeracc = list.accuracy.currentindex if (expressions.category == "congruent") { list.accuracy_congruent.insertitem(values.validcorrect, 1); } else { list.accuracy_incongruent.insertitem(values.validcorrect, 1); }; ] </trial> <expressions> /category = 0 </expressions> <parameters> / minimum_latency = 100 </parameters> <list latencies_congruent> </list> <list latencies_incongruent> </list> <list accuracy_congruent> </list> <list accuracy_incongruent> </list> <list latencies> </list> <list accuracy> </list> <values> /validcorrect = 0 /valid = 0 /sumcorrect = 0 /sumrt = 0 /sumcorrect_congruent = 0 /sumrt_congruent = 0 /sumcorrect_incongruent = 0 /sumrt_incongruent = 0 /testeracc = 0 /count_congruent = 0 /count_incongruent = 0 /trialcount = 0 </values> Thanks / ontrialbegin = [ if (contains (list.distractorX1.currentvalue, "X")) expressions.category = "congruent"; else if (contains(list.distractorX1.currentvalue, "N")) expressions.category = "incongruent"; The flaw in the reasoning here is that _every_ item in that <list> contains an X, i.e. the expression _necessarily_ evaluates to "congruent" <list distractorX1> / items = (te xt. Xleft, te xt. Xright, te xt.Nleft, te xt.Nright) / itemprobabilities = (.25, .25, .25, .25) / selectionmode = random / poolsize = 4 </list> If you check for the strings " .X" and " .N" instead, things should work. <list distractorX1> / items = (text .Xleft, text .Xright, text .Nleft, text .Nright) / itemprobabilities = (.25, .25, .25, .25) / selectionmode = random / poolsize = 4 </list>
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+xHi, I posted a few days ago for some help on the locations of my stimuli - https://www.millisecond.com/forums/Topic22419.aspx - which now all works perfectly so thank you! However, I am trying to use the logic of the alcohol attention bias script (the one online - http://www.millisecond.com/download/library/alcoholdotprobe/) but am having problems with the data recording. I need each trial to check if the distractor is congruent with my target stimuli (an X or an N), then keep a count of this (which i thought i had done 'on trial begin'), the accuracy and latency (which I think should be on trial end). But the data does not record this correctly. It's recording almost every trial as congruent. As it wasn't updating I changed the congruence variable to an expression (as i understand these are evaluated every time they are used?), but it made no difference. Relevant script is pasted below and whole thing is attached. I've also attached an example data file. <trial set3X1> / ontrialbegin = [ values.valid = 0; values.validcorrect = 0; values.trialcount += 1; values.category = 0] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler1.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler2.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler3.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler4.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler5.nextvalue,500);] / ontrialbegin = [values.fillerhpos1 = expressions.hp2] / ontrialbegin = [values.fillerhpos2 = expressions.hp3] / ontrialbegin = [values.fillerhpos3 = expressions.hp4] / ontrialbegin = [values.fillerhpos4 = expressions.hp5] / ontrialbegin = [values.fillerhpos5 = expressions.hp6] / ontrialbegin = [values.fillervpos1 = expressions.vp2] / ontrialbegin = [values.fillervpos2 = expressions.vp3] / ontrialbegin = [values.fillervpos3 = expressions.vp4] / ontrialbegin = [values.fillervpos4 = expressions.vp5] / ontrialbegin = [values.fillervpos5 = expressions.vp6] / ontrialbegin = [trial.set3X1.insertstimulustime(list.distractorX1.nextvalue,500);] / ontrialbegin = [values.distractor = list.distractorX1.currentvalue;] / ontrialbegin = [ if (contains(list.distractorX1.currentvalue, "X")) expressions.category = "congruent"; else if (contains(list.distractorX1.currentvalue, "N")) expressions.category = "incongruent"; ] / ontrialbegin = [ if (expressions.category= "congruent") values.count_congruent += 1; else if (expressions.category= "incongruent") values.count_incongruent += 1; ] / ontrialend = [trial.set3X1.resetstimulusframes(); ] / stimulustimes = [1=fixation; 500=sequence (fixationcover, XLD1); 600=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6)] / validresponse = ("J", "I") / correctresponse = ("J") / response = timeout(2000) / beginresponsetime = 500 / ontrialend = [ if (trial.set3X1.latency >= parameters.minimum_latency) values.valid = 1; if (values.valid == 1) { if (trial.set3X1.correct) { values.validcorrect = 1; values.sumcorrect += 1; values.sumrt += trial.set3X1.latency if (expressions.category == "congruent") { values.sumcorrect_congruent += 1; values.sumrt_congruent += trial.set3X1.latency; list.latencies_congruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } else { values.sumcorrect_incongruent += 1; values.sumrt_incongruent += trial.set3X1.latency; list.latencies_incongruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } } } ; list.accuracy.insertitem(values.validcorrect, 1); values.testeracc = list.accuracy.currentindex if (expressions.category == "congruent") { list.accuracy_congruent.insertitem(values.validcorrect, 1); } else { list.accuracy_incongruent.insertitem(values.validcorrect, 1); }; ] </trial> <expressions> /category = 0 </expressions> <parameters> / minimum_latency = 100 </parameters> <list latencies_congruent> </list> <list latencies_incongruent> </list> <list accuracy_congruent> </list> <list accuracy_incongruent> </list> <list latencies> </list> <list accuracy> </list> <values> /validcorrect = 0 /valid = 0 /sumcorrect = 0 /sumrt = 0 /sumcorrect_congruent = 0 /sumrt_congruent = 0 /sumcorrect_incongruent = 0 /sumrt_incongruent = 0 /testeracc = 0 /count_congruent = 0 /count_incongruent = 0 /trialcount = 0 </values> Thanks / ontrialbegin = [ if (contains (list.distractorX1.currentvalue, "X")) expressions.category = "congruent"; else if (contains(list.distractorX1.currentvalue, "N")) expressions.category = "incongruent"; The flaw in the reasoning here is that _every_ item in that <list> contains an X, i.e. the expression _necessarily_ evaluates to "congruent" <list distractorX1> / items = (te xt. Xleft, te xt. Xright, te xt.Nleft, te xt.Nright) / itemprobabilities = (.25, .25, .25, .25) / selectionmode = random / poolsize = 4 </list> If you check for the strings " .X" and " .N" instead, things should work. <list distractorX1> / items = (text .Xleft, text .Xright, text .Nleft, text .Nright) / itemprobabilities = (.25, .25, .25, .25) / selectionmode = random / poolsize = 4 </list> There may be more going on as well, but I can't actually run your script because it's incomplete. It would be helpful if you could include everything that is needed to run it in the future, i.e. please include all external files required by the script (such as the calibration script incorporated via <include>).
|
|
|
jm560@sussex.ac.uk
|
|
Group: Forum Members
Posts: 25,
Visits: 208
|
+x+x+xHi, I posted a few days ago for some help on the locations of my stimuli - https://www.millisecond.com/forums/Topic22419.aspx - which now all works perfectly so thank you! However, I am trying to use the logic of the alcohol attention bias script (the one online - http://www.millisecond.com/download/library/alcoholdotprobe/) but am having problems with the data recording. I need each trial to check if the distractor is congruent with my target stimuli (an X or an N), then keep a count of this (which i thought i had done 'on trial begin'), the accuracy and latency (which I think should be on trial end). But the data does not record this correctly. It's recording almost every trial as congruent. As it wasn't updating I changed the congruence variable to an expression (as i understand these are evaluated every time they are used?), but it made no difference. Relevant script is pasted below and whole thing is attached. I've also attached an example data file. <trial set3X1> / ontrialbegin = [ values.valid = 0; values.validcorrect = 0; values.trialcount += 1; values.category = 0] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler1.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler2.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler3.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler4.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler5.nextvalue,500);] / ontrialbegin = [values.fillerhpos1 = expressions.hp2] / ontrialbegin = [values.fillerhpos2 = expressions.hp3] / ontrialbegin = [values.fillerhpos3 = expressions.hp4] / ontrialbegin = [values.fillerhpos4 = expressions.hp5] / ontrialbegin = [values.fillerhpos5 = expressions.hp6] / ontrialbegin = [values.fillervpos1 = expressions.vp2] / ontrialbegin = [values.fillervpos2 = expressions.vp3] / ontrialbegin = [values.fillervpos3 = expressions.vp4] / ontrialbegin = [values.fillervpos4 = expressions.vp5] / ontrialbegin = [values.fillervpos5 = expressions.vp6] / ontrialbegin = [trial.set3X1.insertstimulustime(list.distractorX1.nextvalue,500);] / ontrialbegin = [values.distractor = list.distractorX1.currentvalue;] / ontrialbegin = [ if (contains(list.distractorX1.currentvalue, "X")) expressions.category = "congruent"; else if (contains(list.distractorX1.currentvalue, "N")) expressions.category = "incongruent"; ] / ontrialbegin = [ if (expressions.category= "congruent") values.count_congruent += 1; else if (expressions.category= "incongruent") values.count_incongruent += 1; ] / ontrialend = [trial.set3X1.resetstimulusframes(); ] / stimulustimes = [1=fixation; 500=sequence (fixationcover, XLD1); 600=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6)] / validresponse = ("J", "I") / correctresponse = ("J") / response = timeout(2000) / beginresponsetime = 500 / ontrialend = [ if (trial.set3X1.latency >= parameters.minimum_latency) values.valid = 1; if (values.valid == 1) { if (trial.set3X1.correct) { values.validcorrect = 1; values.sumcorrect += 1; values.sumrt += trial.set3X1.latency if (expressions.category == "congruent") { values.sumcorrect_congruent += 1; values.sumrt_congruent += trial.set3X1.latency; list.latencies_congruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } else { values.sumcorrect_incongruent += 1; values.sumrt_incongruent += trial.set3X1.latency; list.latencies_incongruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } } } ; list.accuracy.insertitem(values.validcorrect, 1); values.testeracc = list.accuracy.currentindex if (expressions.category == "congruent") { list.accuracy_congruent.insertitem(values.validcorrect, 1); } else { list.accuracy_incongruent.insertitem(values.validcorrect, 1); }; ] </trial> <expressions> /category = 0 </expressions> <parameters> / minimum_latency = 100 </parameters> <list latencies_congruent> </list> <list latencies_incongruent> </list> <list accuracy_congruent> </list> <list accuracy_incongruent> </list> <list latencies> </list> <list accuracy> </list> <values> /validcorrect = 0 /valid = 0 /sumcorrect = 0 /sumrt = 0 /sumcorrect_congruent = 0 /sumrt_congruent = 0 /sumcorrect_incongruent = 0 /sumrt_incongruent = 0 /testeracc = 0 /count_congruent = 0 /count_incongruent = 0 /trialcount = 0 </values> Thanks / ontrialbegin = [ if (contains (list.distractorX1.currentvalue, "X")) expressions.category = "congruent"; else if (contains(list.distractorX1.currentvalue, "N")) expressions.category = "incongruent"; The flaw in the reasoning here is that _every_ item in that <list> contains an X, i.e. the expression _necessarily_ evaluates to "congruent" <list distractorX1> / items = (te xt. Xleft, te xt. Xright, te xt.Nleft, te xt.Nright) / itemprobabilities = (.25, .25, .25, .25) / selectionmode = random / poolsize = 4 </list> If you check for the strings " .X" and " .N" instead, things should work. <list distractorX1> / items = (text .Xleft, text .Xright, text .Nleft, text .Nright) / itemprobabilities = (.25, .25, .25, .25) / selectionmode = random / poolsize = 4 </list> There may be more going on as well, but I can't actually run your script because it's incomplete. It would be helpful if you could include everything that is needed to run it in the future, i.e. please include all external files required by the script (such as the calibration script incorporated via <include>). Hi, I've tried changing it to ".X" and ".N" - no luck - still records everything as congruent Sorry, I've attached the sizing script, an image which it needs for an understanding check at the beginning (a screenshot of the experiment) and i could not upload the error beep (wav file) so i took it out of the experiment (I checked that it still runs) and attached the new script here. That's everything. Thanks
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+x+xHi, I posted a few days ago for some help on the locations of my stimuli - https://www.millisecond.com/forums/Topic22419.aspx - which now all works perfectly so thank you! However, I am trying to use the logic of the alcohol attention bias script (the one online - http://www.millisecond.com/download/library/alcoholdotprobe/) but am having problems with the data recording. I need each trial to check if the distractor is congruent with my target stimuli (an X or an N), then keep a count of this (which i thought i had done 'on trial begin'), the accuracy and latency (which I think should be on trial end). But the data does not record this correctly. It's recording almost every trial as congruent. As it wasn't updating I changed the congruence variable to an expression (as i understand these are evaluated every time they are used?), but it made no difference. Relevant script is pasted below and whole thing is attached. I've also attached an example data file. <trial set3X1> / ontrialbegin = [ values.valid = 0; values.validcorrect = 0; values.trialcount += 1; values.category = 0] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler1.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler2.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler3.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler4.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler5.nextvalue,500);] / ontrialbegin = [values.fillerhpos1 = expressions.hp2] / ontrialbegin = [values.fillerhpos2 = expressions.hp3] / ontrialbegin = [values.fillerhpos3 = expressions.hp4] / ontrialbegin = [values.fillerhpos4 = expressions.hp5] / ontrialbegin = [values.fillerhpos5 = expressions.hp6] / ontrialbegin = [values.fillervpos1 = expressions.vp2] / ontrialbegin = [values.fillervpos2 = expressions.vp3] / ontrialbegin = [values.fillervpos3 = expressions.vp4] / ontrialbegin = [values.fillervpos4 = expressions.vp5] / ontrialbegin = [values.fillervpos5 = expressions.vp6] / ontrialbegin = [trial.set3X1.insertstimulustime(list.distractorX1.nextvalue,500);] / ontrialbegin = [values.distractor = list.distractorX1.currentvalue;] / ontrialbegin = [ if (contains(list.distractorX1.currentvalue, "X")) expressions.category = "congruent"; else if (contains(list.distractorX1.currentvalue, "N")) expressions.category = "incongruent"; ] / ontrialbegin = [ if (expressions.category= "congruent") values.count_congruent += 1; else if (expressions.category= "incongruent") values.count_incongruent += 1; ] / ontrialend = [trial.set3X1.resetstimulusframes(); ] / stimulustimes = [1=fixation; 500=sequence (fixationcover, XLD1); 600=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6)] / validresponse = ("J", "I") / correctresponse = ("J") / response = timeout(2000) / beginresponsetime = 500 / ontrialend = [ if (trial.set3X1.latency >= parameters.minimum_latency) values.valid = 1; if (values.valid == 1) { if (trial.set3X1.correct) { values.validcorrect = 1; values.sumcorrect += 1; values.sumrt += trial.set3X1.latency if (expressions.category == "congruent") { values.sumcorrect_congruent += 1; values.sumrt_congruent += trial.set3X1.latency; list.latencies_congruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } else { values.sumcorrect_incongruent += 1; values.sumrt_incongruent += trial.set3X1.latency; list.latencies_incongruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } } } ; list.accuracy.insertitem(values.validcorrect, 1); values.testeracc = list.accuracy.currentindex if (expressions.category == "congruent") { list.accuracy_congruent.insertitem(values.validcorrect, 1); } else { list.accuracy_incongruent.insertitem(values.validcorrect, 1); }; ] </trial> <expressions> /category = 0 </expressions> <parameters> / minimum_latency = 100 </parameters> <list latencies_congruent> </list> <list latencies_incongruent> </list> <list accuracy_congruent> </list> <list accuracy_incongruent> </list> <list latencies> </list> <list accuracy> </list> <values> /validcorrect = 0 /valid = 0 /sumcorrect = 0 /sumrt = 0 /sumcorrect_congruent = 0 /sumrt_congruent = 0 /sumcorrect_incongruent = 0 /sumrt_incongruent = 0 /testeracc = 0 /count_congruent = 0 /count_incongruent = 0 /trialcount = 0 </values> Thanks / ontrialbegin = [ if (contains (list.distractorX1.currentvalue, "X")) expressions.category = "congruent"; else if (contains(list.distractorX1.currentvalue, "N")) expressions.category = "incongruent"; The flaw in the reasoning here is that _every_ item in that <list> contains an X, i.e. the expression _necessarily_ evaluates to "congruent" <list distractorX1> / items = (te xt. Xleft, te xt. Xright, te xt.Nleft, te xt.Nright) / itemprobabilities = (.25, .25, .25, .25) / selectionmode = random / poolsize = 4 </list> If you check for the strings " .X" and " .N" instead, things should work. <list distractorX1> / items = (text .Xleft, text .Xright, text .Nleft, text .Nright) / itemprobabilities = (.25, .25, .25, .25) / selectionmode = random / poolsize = 4 </list> There may be more going on as well, but I can't actually run your script because it's incomplete. It would be helpful if you could include everything that is needed to run it in the future, i.e. please include all external files required by the script (such as the calibration script incorporated via <include>). Hi, I've tried changing it to ".X" and ".N" - no luck - still records everything as congruent Sorry, I've attached the sizing script, an image which it needs for an understanding check at the beginning (a screenshot of the experiment) and i could not upload the error beep (wav file) so i took it out of the experiment (I checked that it still runs) and attached the new script here. That's everything. Thanks Thanks for the full code, that makes things easier to track down. The culprits are the misplaced delimiter (;) in your /ontrialbegin logic as well as the use of the improper operator (= instead of ==), which are throwing things off. I overlooked those when merely reading through the code. Properly expressed, the logic should read: <trial set3X1> ... / ontrialbegin = [ if (contains(list.distractorX1.currentvalue, ".X")) expressions.category = "congruent" else if (contains(list.distractorX1.currentvalue, ".N")) expressions.category = "incongruent"; ] / ontrialbegin = [ if (expressions.category=="congruent") values.count_congruent += 1 else if (expressions.category=="incongruent") values.count_incongruent += 1; ] ... </trial> Hope this helps.
|
|
|
jm560@sussex.ac.uk
|
|
Group: Forum Members
Posts: 25,
Visits: 208
|
+x+x+x+x+xHi, I posted a few days ago for some help on the locations of my stimuli - https://www.millisecond.com/forums/Topic22419.aspx - which now all works perfectly so thank you! However, I am trying to use the logic of the alcohol attention bias script (the one online - http://www.millisecond.com/download/library/alcoholdotprobe/) but am having problems with the data recording. I need each trial to check if the distractor is congruent with my target stimuli (an X or an N), then keep a count of this (which i thought i had done 'on trial begin'), the accuracy and latency (which I think should be on trial end). But the data does not record this correctly. It's recording almost every trial as congruent. As it wasn't updating I changed the congruence variable to an expression (as i understand these are evaluated every time they are used?), but it made no difference. Relevant script is pasted below and whole thing is attached. I've also attached an example data file. <trial set3X1> / ontrialbegin = [ values.valid = 0; values.validcorrect = 0; values.trialcount += 1; values.category = 0] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler1.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler2.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler3.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler4.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler5.nextvalue,500);] / ontrialbegin = [values.fillerhpos1 = expressions.hp2] / ontrialbegin = [values.fillerhpos2 = expressions.hp3] / ontrialbegin = [values.fillerhpos3 = expressions.hp4] / ontrialbegin = [values.fillerhpos4 = expressions.hp5] / ontrialbegin = [values.fillerhpos5 = expressions.hp6] / ontrialbegin = [values.fillervpos1 = expressions.vp2] / ontrialbegin = [values.fillervpos2 = expressions.vp3] / ontrialbegin = [values.fillervpos3 = expressions.vp4] / ontrialbegin = [values.fillervpos4 = expressions.vp5] / ontrialbegin = [values.fillervpos5 = expressions.vp6] / ontrialbegin = [trial.set3X1.insertstimulustime(list.distractorX1.nextvalue,500);] / ontrialbegin = [values.distractor = list.distractorX1.currentvalue;] / ontrialbegin = [ if (contains(list.distractorX1.currentvalue, "X")) expressions.category = "congruent"; else if (contains(list.distractorX1.currentvalue, "N")) expressions.category = "incongruent"; ] / ontrialbegin = [ if (expressions.category= "congruent") values.count_congruent += 1; else if (expressions.category= "incongruent") values.count_incongruent += 1; ] / ontrialend = [trial.set3X1.resetstimulusframes(); ] / stimulustimes = [1=fixation; 500=sequence (fixationcover, XLD1); 600=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6)] / validresponse = ("J", "I") / correctresponse = ("J") / response = timeout(2000) / beginresponsetime = 500 / ontrialend = [ if (trial.set3X1.latency >= parameters.minimum_latency) values.valid = 1; if (values.valid == 1) { if (trial.set3X1.correct) { values.validcorrect = 1; values.sumcorrect += 1; values.sumrt += trial.set3X1.latency if (expressions.category == "congruent") { values.sumcorrect_congruent += 1; values.sumrt_congruent += trial.set3X1.latency; list.latencies_congruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } else { values.sumcorrect_incongruent += 1; values.sumrt_incongruent += trial.set3X1.latency; list.latencies_incongruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } } } ; list.accuracy.insertitem(values.validcorrect, 1); values.testeracc = list.accuracy.currentindex if (expressions.category == "congruent") { list.accuracy_congruent.insertitem(values.validcorrect, 1); } else { list.accuracy_incongruent.insertitem(values.validcorrect, 1); }; ] </trial> <expressions> /category = 0 </expressions> <parameters> / minimum_latency = 100 </parameters> <list latencies_congruent> </list> <list latencies_incongruent> </list> <list accuracy_congruent> </list> <list accuracy_incongruent> </list> <list latencies> </list> <list accuracy> </list> <values> /validcorrect = 0 /valid = 0 /sumcorrect = 0 /sumrt = 0 /sumcorrect_congruent = 0 /sumrt_congruent = 0 /sumcorrect_incongruent = 0 /sumrt_incongruent = 0 /testeracc = 0 /count_congruent = 0 /count_incongruent = 0 /trialcount = 0 </values> Thanks / ontrialbegin = [ if (contains (list.distractorX1.currentvalue, "X")) expressions.category = "congruent"; else if (contains(list.distractorX1.currentvalue, "N")) expressions.category = "incongruent"; The flaw in the reasoning here is that _every_ item in that <list> contains an X, i.e. the expression _necessarily_ evaluates to "congruent" <list distractorX1> / items = (te xt. Xleft, te xt. Xright, te xt.Nleft, te xt.Nright) / itemprobabilities = (.25, .25, .25, .25) / selectionmode = random / poolsize = 4 </list> If you check for the strings " .X" and " .N" instead, things should work. <list distractorX1> / items = (text .Xleft, text .Xright, text .Nleft, text .Nright) / itemprobabilities = (.25, .25, .25, .25) / selectionmode = random / poolsize = 4 </list> There may be more going on as well, but I can't actually run your script because it's incomplete. It would be helpful if you could include everything that is needed to run it in the future, i.e. please include all external files required by the script (such as the calibration script incorporated via <include>). Hi, I've tried changing it to ".X" and ".N" - no luck - still records everything as congruent Sorry, I've attached the sizing script, an image which it needs for an understanding check at the beginning (a screenshot of the experiment) and i could not upload the error beep (wav file) so i took it out of the experiment (I checked that it still runs) and attached the new script here. That's everything. Thanks Thanks for the full code, that makes things easier to track down. The culprits are the misplaced delimiter (;) in your /ontrialbegin logic as well as the use of the improper operator (= instead of ==), which are throwing things off. I overlooked those when merely reading through the code. Properly expressed, the logic should read: <trial set3X1> ... / ontrialbegin = [ if (contains(list.distractorX1.currentvalue, ".X")) expressions.category = "congruent" else if (contains(list.distractorX1.currentvalue, ".N")) expressions.category = "incongruent"; ] / ontrialbegin = [ if (expressions.category=="congruent") values.count_congruent += 1 else if (expressions.category=="incongruent") values.count_incongruent += 1; ] ... </trial> Hope this helps. Completely fixed - thank you so much!
|
|
|
jm560@sussex.ac.uk
|
|
Group: Forum Members
Posts: 25,
Visits: 208
|
+x+x+x+x+x+xHi, I posted a few days ago for some help on the locations of my stimuli - https://www.millisecond.com/forums/Topic22419.aspx - which now all works perfectly so thank you! However, I am trying to use the logic of the alcohol attention bias script (the one online - http://www.millisecond.com/download/library/alcoholdotprobe/) but am having problems with the data recording. I need each trial to check if the distractor is congruent with my target stimuli (an X or an N), then keep a count of this (which i thought i had done 'on trial begin'), the accuracy and latency (which I think should be on trial end). But the data does not record this correctly. It's recording almost every trial as congruent. As it wasn't updating I changed the congruence variable to an expression (as i understand these are evaluated every time they are used?), but it made no difference. Relevant script is pasted below and whole thing is attached. I've also attached an example data file. <trial set3X1> / ontrialbegin = [ values.valid = 0; values.validcorrect = 0; values.trialcount += 1; values.category = 0] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler1.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler2.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler3.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler4.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler5.nextvalue,500);] / ontrialbegin = [values.fillerhpos1 = expressions.hp2] / ontrialbegin = [values.fillerhpos2 = expressions.hp3] / ontrialbegin = [values.fillerhpos3 = expressions.hp4] / ontrialbegin = [values.fillerhpos4 = expressions.hp5] / ontrialbegin = [values.fillerhpos5 = expressions.hp6] / ontrialbegin = [values.fillervpos1 = expressions.vp2] / ontrialbegin = [values.fillervpos2 = expressions.vp3] / ontrialbegin = [values.fillervpos3 = expressions.vp4] / ontrialbegin = [values.fillervpos4 = expressions.vp5] / ontrialbegin = [values.fillervpos5 = expressions.vp6] / ontrialbegin = [trial.set3X1.insertstimulustime(list.distractorX1.nextvalue,500);] / ontrialbegin = [values.distractor = list.distractorX1.currentvalue;] / ontrialbegin = [ if (contains(list.distractorX1.currentvalue, "X")) expressions.category = "congruent"; else if (contains(list.distractorX1.currentvalue, "N")) expressions.category = "incongruent"; ] / ontrialbegin = [ if (expressions.category= "congruent") values.count_congruent += 1; else if (expressions.category= "incongruent") values.count_incongruent += 1; ] / ontrialend = [trial.set3X1.resetstimulusframes(); ] / stimulustimes = [1=fixation; 500=sequence (fixationcover, XLD1); 600=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6)] / validresponse = ("J", "I") / correctresponse = ("J") / response = timeout(2000) / beginresponsetime = 500 / ontrialend = [ if (trial.set3X1.latency >= parameters.minimum_latency) values.valid = 1; if (values.valid == 1) { if (trial.set3X1.correct) { values.validcorrect = 1; values.sumcorrect += 1; values.sumrt += trial.set3X1.latency if (expressions.category == "congruent") { values.sumcorrect_congruent += 1; values.sumrt_congruent += trial.set3X1.latency; list.latencies_congruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } else { values.sumcorrect_incongruent += 1; values.sumrt_incongruent += trial.set3X1.latency; list.latencies_incongruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } } } ; list.accuracy.insertitem(values.validcorrect, 1); values.testeracc = list.accuracy.currentindex if (expressions.category == "congruent") { list.accuracy_congruent.insertitem(values.validcorrect, 1); } else { list.accuracy_incongruent.insertitem(values.validcorrect, 1); }; ] </trial> <expressions> /category = 0 </expressions> <parameters> / minimum_latency = 100 </parameters> <list latencies_congruent> </list> <list latencies_incongruent> </list> <list accuracy_congruent> </list> <list accuracy_incongruent> </list> <list latencies> </list> <list accuracy> </list> <values> /validcorrect = 0 /valid = 0 /sumcorrect = 0 /sumrt = 0 /sumcorrect_congruent = 0 /sumrt_congruent = 0 /sumcorrect_incongruent = 0 /sumrt_incongruent = 0 /testeracc = 0 /count_congruent = 0 /count_incongruent = 0 /trialcount = 0 </values> Thanks / ontrialbegin = [ if (contains (list.distractorX1.currentvalue, "X")) expressions.category = "congruent"; else if (contains(list.distractorX1.currentvalue, "N")) expressions.category = "incongruent"; The flaw in the reasoning here is that _every_ item in that <list> contains an X, i.e. the expression _necessarily_ evaluates to "congruent" <list distractorX1> / items = (te xt. Xleft, te xt. Xright, te xt.Nleft, te xt.Nright) / itemprobabilities = (.25, .25, .25, .25) / selectionmode = random / poolsize = 4 </list> If you check for the strings " .X" and " .N" instead, things should work. <list distractorX1> / items = (text .Xleft, text .Xright, text .Nleft, text .Nright) / itemprobabilities = (.25, .25, .25, .25) / selectionmode = random / poolsize = 4 </list> There may be more going on as well, but I can't actually run your script because it's incomplete. It would be helpful if you could include everything that is needed to run it in the future, i.e. please include all external files required by the script (such as the calibration script incorporated via <include>). Hi, I've tried changing it to ".X" and ".N" - no luck - still records everything as congruent Sorry, I've attached the sizing script, an image which it needs for an understanding check at the beginning (a screenshot of the experiment) and i could not upload the error beep (wav file) so i took it out of the experiment (I checked that it still runs) and attached the new script here. That's everything. Thanks Thanks for the full code, that makes things easier to track down. The culprits are the misplaced delimiter (;) in your /ontrialbegin logic as well as the use of the improper operator (= instead of ==), which are throwing things off. I overlooked those when merely reading through the code. Properly expressed, the logic should read: <trial set3X1> ... / ontrialbegin = [ if (contains(list.distractorX1.currentvalue, ".X")) expressions.category = "congruent" else if (contains(list.distractorX1.currentvalue, ".N")) expressions.category = "incongruent"; ] / ontrialbegin = [ if (expressions.category=="congruent") values.count_congruent += 1 else if (expressions.category=="incongruent") values.count_incongruent += 1; ] ... </trial> Hope this helps. Completely fixed - thank you so much! Sorry, one more question - it's my last for this experiment - promise. The filler stimuli in my experiment are selected via a list, I've had to use a separate text element for every stimulus as some are different sizes. The also need to be selected in sequence as the first text stimulus selected in list 3filler1 needs to match the first one selected in the next list 3filler 2 (i.e When the first H is selected in list s3filler1 then K needs to be selected on s3filler2). But i also want the selection of letters from the list to be random on each trial, so that H & K are not always selected first. I thought I could do this with counters but cannot work out how? These are the lists below i want to use a counter to select from <list s3filler1> / items = (text.H1, text.Z1, text.O1, text.M1, text.K1, text.O1, text.W1, text.H1, text.O1, text.Z1, text.K1, text.O1, text.M1, text.W1, text.O1, text.H1, text.Z1, text.O1, text.M1, text.K1, text.O1, text.W1, text.H1, text.O1, text.Z1, text.K1, text.O1, text.M1, text.W1, text.O1, text.H1, text.Z1, text.O1, text.M1, text.K1, text.O1, text.W1, text.H1, text.O1, text.Z1, text.K1, text.O1, text.M1, text.W1, text.O1, text.Z1, text.K1, text.O1) / select = sequence </list> <list s3filler2> / items = (text.K2, text.O2, text.O2, text.W2, text.O2, text.O2, text.M2, text.O2, text.O2, text.K2, text.O2, text.O2, text.H2, text.O2, text.O2, text.K2, text.O2, text.O2, text.W2, text.O2, text.O2, text.M2, text.O2, text.O2, text.K2, text.O2, text.O2, text.H2, text.O2, text.O2, text.K2, text.O2, text.O2, text.W2, text.O2, text.O2, text.M2, text.O2, text.O2, text.K2, text.O2, text.O2, text.H2, text.O2, text.O2, text.K2, text.O2, text.O2) / select = sequence </list> I've been trying to do it like in this post https://www.millisecond.com/forums/Topic8688.aspxSo use one counter and then a second counter to copy the first <counter t1selector> /items = (1,2,3) / select = noreplace </counter>
<counter t2selector> /items = (1,2,3) / select = current(t1selector) </counter>
But i don't understand what to put in the items section as my stimuli don't have item numbers (as i had to make them separately so the text size could be different). I've tried writing in 'text.H1' etc but i can't get this to work. Is there a way of assigning item numbers?
Thanks
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+x+x+x+x+xHi, I posted a few days ago for some help on the locations of my stimuli - https://www.millisecond.com/forums/Topic22419.aspx - which now all works perfectly so thank you! However, I am trying to use the logic of the alcohol attention bias script (the one online - http://www.millisecond.com/download/library/alcoholdotprobe/) but am having problems with the data recording. I need each trial to check if the distractor is congruent with my target stimuli (an X or an N), then keep a count of this (which i thought i had done 'on trial begin'), the accuracy and latency (which I think should be on trial end). But the data does not record this correctly. It's recording almost every trial as congruent. As it wasn't updating I changed the congruence variable to an expression (as i understand these are evaluated every time they are used?), but it made no difference. Relevant script is pasted below and whole thing is attached. I've also attached an example data file. <trial set3X1> / ontrialbegin = [ values.valid = 0; values.validcorrect = 0; values.trialcount += 1; values.category = 0] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler1.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler2.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler3.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler4.nextvalue,500);] / ontrialbegin = [trial.set3X1.insertstimulustime(list.s3filler5.nextvalue,500);] / ontrialbegin = [values.fillerhpos1 = expressions.hp2] / ontrialbegin = [values.fillerhpos2 = expressions.hp3] / ontrialbegin = [values.fillerhpos3 = expressions.hp4] / ontrialbegin = [values.fillerhpos4 = expressions.hp5] / ontrialbegin = [values.fillerhpos5 = expressions.hp6] / ontrialbegin = [values.fillervpos1 = expressions.vp2] / ontrialbegin = [values.fillervpos2 = expressions.vp3] / ontrialbegin = [values.fillervpos3 = expressions.vp4] / ontrialbegin = [values.fillervpos4 = expressions.vp5] / ontrialbegin = [values.fillervpos5 = expressions.vp6] / ontrialbegin = [trial.set3X1.insertstimulustime(list.distractorX1.nextvalue,500);] / ontrialbegin = [values.distractor = list.distractorX1.currentvalue;] / ontrialbegin = [ if (contains(list.distractorX1.currentvalue, "X")) expressions.category = "congruent"; else if (contains(list.distractorX1.currentvalue, "N")) expressions.category = "incongruent"; ] / ontrialbegin = [ if (expressions.category= "congruent") values.count_congruent += 1; else if (expressions.category= "incongruent") values.count_incongruent += 1; ] / ontrialend = [trial.set3X1.resetstimulusframes(); ] / stimulustimes = [1=fixation; 500=sequence (fixationcover, XLD1); 600=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6)] / validresponse = ("J", "I") / correctresponse = ("J") / response = timeout(2000) / beginresponsetime = 500 / ontrialend = [ if (trial.set3X1.latency >= parameters.minimum_latency) values.valid = 1; if (values.valid == 1) { if (trial.set3X1.correct) { values.validcorrect = 1; values.sumcorrect += 1; values.sumrt += trial.set3X1.latency if (expressions.category == "congruent") { values.sumcorrect_congruent += 1; values.sumrt_congruent += trial.set3X1.latency; list.latencies_congruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } else { values.sumcorrect_incongruent += 1; values.sumrt_incongruent += trial.set3X1.latency; list.latencies_incongruent.insertitem(trial.set3X1.latency, 1); list.latencies.insertitem(trial.set3X1.latency, 1); } } } ; list.accuracy.insertitem(values.validcorrect, 1); values.testeracc = list.accuracy.currentindex if (expressions.category == "congruent") { list.accuracy_congruent.insertitem(values.validcorrect, 1); } else { list.accuracy_incongruent.insertitem(values.validcorrect, 1); }; ] </trial> <expressions> /category = 0 </expressions> <parameters> / minimum_latency = 100 </parameters> <list latencies_congruent> </list> <list latencies_incongruent> </list> <list accuracy_congruent> </list> <list accuracy_incongruent> </list> <list latencies> </list> <list accuracy> </list> <values> /validcorrect = 0 /valid = 0 /sumcorrect = 0 /sumrt = 0 /sumcorrect_congruent = 0 /sumrt_congruent = 0 /sumcorrect_incongruent = 0 /sumrt_incongruent = 0 /testeracc = 0 /count_congruent = 0 /count_incongruent = 0 /trialcount = 0 </values> Thanks / ontrialbegin = [ if (contains (list.distractorX1.currentvalue, "X")) expressions.category = "congruent"; else if (contains(list.distractorX1.currentvalue, "N")) expressions.category = "incongruent"; The flaw in the reasoning here is that _every_ item in that <list> contains an X, i.e. the expression _necessarily_ evaluates to "congruent" <list distractorX1> / items = (te xt. Xleft, te xt. Xright, te xt.Nleft, te xt.Nright) / itemprobabilities = (.25, .25, .25, .25) / selectionmode = random / poolsize = 4 </list> If you check for the strings " .X" and " .N" instead, things should work. <list distractorX1> / items = (text .Xleft, text .Xright, text .Nleft, text .Nright) / itemprobabilities = (.25, .25, .25, .25) / selectionmode = random / poolsize = 4 </list> There may be more going on as well, but I can't actually run your script because it's incomplete. It would be helpful if you could include everything that is needed to run it in the future, i.e. please include all external files required by the script (such as the calibration script incorporated via <include>). Hi, I've tried changing it to ".X" and ".N" - no luck - still records everything as congruent Sorry, I've attached the sizing script, an image which it needs for an understanding check at the beginning (a screenshot of the experiment) and i could not upload the error beep (wav file) so i took it out of the experiment (I checked that it still runs) and attached the new script here. That's everything. Thanks Thanks for the full code, that makes things easier to track down. The culprits are the misplaced delimiter (;) in your /ontrialbegin logic as well as the use of the improper operator (= instead of ==), which are throwing things off. I overlooked those when merely reading through the code. Properly expressed, the logic should read: <trial set3X1> ... / ontrialbegin = [ if (contains(list.distractorX1.currentvalue, ".X")) expressions.category = "congruent" else if (contains(list.distractorX1.currentvalue, ".N")) expressions.category = "incongruent"; ] / ontrialbegin = [ if (expressions.category=="congruent") values.count_congruent += 1 else if (expressions.category=="incongruent") values.count_incongruent += 1; ] ... </trial> Hope this helps. Completely fixed - thank you so much! Sorry, one more question - it's my last for this experiment - promise. The filler stimuli in my experiment are selected via a list, I've had to use a separate text element for every stimulus as some are different sizes. The also need to be selected in sequence as the first text stimulus selected in list 3filler1 needs to match the first one selected in the next list 3filler 2 (i.e When the first H is selected in list s3filler1 then K needs to be selected on s3filler2). But i also want the selection of letters from the list to be random on each trial, so that H & K are not always selected first. I thought I could do this with counters but cannot work out how? These are the lists below i want to use a counter to select from <list s3filler1> / items = (text.H1, text.Z1, text.O1, text.M1, text.K1, text.O1, text.W1, text.H1, text.O1, text.Z1, text.K1, text.O1, text.M1, text.W1, text.O1, text.H1, text.Z1, text.O1, text.M1, text.K1, text.O1, text.W1, text.H1, text.O1, text.Z1, text.K1, text.O1, text.M1, text.W1, text.O1, text.H1, text.Z1, text.O1, text.M1, text.K1, text.O1, text.W1, text.H1, text.O1, text.Z1, text.K1, text.O1, text.M1, text.W1, text.O1, text.Z1, text.K1, text.O1) / select = sequence </list> <list s3filler2> / items = (text.K2, text.O2, text.O2, text.W2, text.O2, text.O2, text.M2, text.O2, text.O2, text.K2, text.O2, text.O2, text.H2, text.O2, text.O2, text.K2, text.O2, text.O2, text.W2, text.O2, text.O2, text.M2, text.O2, text.O2, text.K2, text.O2, text.O2, text.H2, text.O2, text.O2, text.K2, text.O2, text.O2, text.W2, text.O2, text.O2, text.M2, text.O2, text.O2, text.K2, text.O2, text.O2, text.H2, text.O2, text.O2, text.K2, text.O2, text.O2) / select = sequence </list> I've been trying to do it like in this post https://www.millisecond.com/forums/Topic8688.aspxSo use one counter and then a second counter to copy the first <counter t1selector> /items = (1,2,3) / select = noreplace </counter>
<counter t2selector> /items = (1,2,3) / select = current(t1selector) </counter>
But i don't understand what to put in the items section as my stimuli don't have item numbers (as i had to make them separately so the text size could be different). I've tried writing in 'text.H1' etc but i can't get this to work. Is there a way of assigning item numbers?
Thanks
You don't need extra <counter>s -- in fact, <list> elements are a more powerful replacement for the legacy <counter> element to begin with. All you need to do is _pair_ your two <list>s:
<list s3filler1> / items = (text.H1, text.Z1, text.O1, text.M1, text.K1, text.O1, text.W1, text.H1, text.O1, text.Z1, text.K1, text.O1, text.M1, text.W1, text.O1, text.H1, text.Z1, text.O1, text.M1, text.K1, text.O1, text.W1, text.H1, text.O1, text.Z1, text.K1, text.O1, text.M1, text.W1, text.O1, text.H1, text.Z1, text.O1, text.M1, text.K1, text.O1, text.W1, text.H1, text.O1, text.Z1, text.K1, text.O1, text.M1, text.W1, text.O1, text.Z1, text.K1, text.O1) / selectionmode = random </list>
<list s3filler2> / items = (text.K2, text.O2, text.O2, text.W2, text.O2, text.O2, text.M2, text.O2, text.O2, text.K2, text.O2, text.O2, text.H2, text.O2, text.O2, text.K2, text.O2, text.O2, text.W2, text.O2, text.O2, text.M2, text.O2, text.O2, text.K2, text.O2, text.O2, text.H2, text.O2, text.O2, text.K2, text.O2, text.O2, text.W2, text.O2, text.O2, text.M2, text.O2, text.O2, text.K2, text.O2, text.O2, text.H2, text.O2, text.O2, text.K2, text.O2, text.O2) / selectionmode = list.s3filler1.currentindex </list>
Whatever item is _randomly_ selected from list s1filler1, the _corresponding_ item will be selected from list.s3filler2.
Here's a simple example to illustrate:
<text a1> / items = ("A1") / position = (50%,48%) </text> <text a2> / items = ("A2") / position = (50%,52%) </text>
<text b1> / items = ("B1") / position = (50%,48%) </text> <text b2> / items = ("B2") / position = (50%,52%) </text>
<text c1> / items = ("C1") / position = (50%,48%) </text> <text c2> / items = ("C2") / position = (50%,52%) </text>
<list filler1> / items = (text.a1, text.b1, text.c1) / selectionmode = random </list>
<list filler2> / items = (text.a2, text.b2, text.c2) / selectionmode = list.filler1.currentindex </list>
<trial example> / ontrialbegin = [ trial.example.insertstimulusframe(list.filler1.nextvalue, 1); trial.example.insertstimulusframe(list.filler2.nextvalue, 1); ] / validresponse = (57) </trial>
<block myblock> / trials = [1-3 = example] </block>
|
|
|