+xHello,
We're experiencing issues with the summary variable
meanrt on a modified version of generic dot probe. According to the script, this variable represents the mean reaction time for all trials with correct responses, and is calculated by:
meanrt = values.sumrt/values.sumcorrectHowever, on the participants we've run so far, this variable is recorded as '0' in the summary data file regardless of the latencies for the individual trials, which are all > 100ms (the minimum required for it to count toward the mean latency). I have tried adding in the
values.sumrt and
values.sumcorrect variables into the script to be included in the summary data file, but
values.sumrt is also recorded as '0'. It appears that the calculation for summing the individual rt's is not taking place correctly.
I would appreciate any insight! Thank you in advance.
There is a syntax mistake in the script that prevents the values.sumrt variable from being updated, i.e. it remains at zero -- its initial value -- throughout.
<trial anger>
...
/ ontrialend = [
trial.anger.resetstimulusframes();
values.target_image = text.angerTarget.currentitem;
values.comp_image = text.angerComp.currentitem;
if (trial.anger.latency >= parameters.minimum_latency)
values.valid = 1;
if (values.valid == 1) {
if (trial.anger.correct) {
values.validcorrect = 1;
values.sumcorrect += 1;
values.sumrt += trial.anger.latency <--- ; separator is missing here if (values.congruence == 1) {
values.sumcorrect_congruent_anger += 1;
values.sumrt_congruent_anger += trial.anger.latency;
list.latencies_anger_C.insertitem(trial.anger.latency, 1);
list.latencies.insertitem(trial.anger.latency, 1);
} else {
values.sumcorrect_incongruent_anger += 1;
values.sumrt_incongruent_anger += trial.anger.latency;
list.latencies_anger_IC.insertitem(trial.anger.latency, 1);
list.latencies.insertitem(trial.anger.latency, 1);
}
}
} ;
...
</trial>
i.e., it ought to read
<trial anger>
...
/ ontrialend = [
trial.anger.resetstimulusframes();
values.target_image = text.angerTarget.currentitem;
values.comp_image = text.angerComp.currentitem;
if (trial.anger.latency >= parameters.minimum_latency)
values.valid = 1;
if (values.valid == 1) {
if (trial.anger.correct) {
values.validcorrect = 1;
values.sumcorrect += 1;
values.sumrt += trial.anger.latency; if (values.congruence == 1) {
values.sumcorrect_congruent_anger += 1;
values.sumrt_congruent_anger += trial.anger.latency;
list.latencies_anger_C.insertitem(trial.anger.latency, 1);
list.latencies.insertitem(trial.anger.latency, 1);
} else {
values.sumcorrect_incongruent_anger += 1;
values.sumrt_incongruent_anger += trial.anger.latency;
list.latencies_anger_IC.insertitem(trial.anger.latency, 1);
list.latencies.insertitem(trial.anger.latency, 1);
}
}
} ;
...
</trial>
The same issue exists in <trial fear>, <trial neut> and <trial sad> -- once that's fixed, the expression should work just fine.