Group: Administrators
Posts: 13K,
Visits: 104K
|
> With the following script, Inquisit still counts the timeout to the latency.
What makes you think that?
<trial blueincongruent> ... /ontrialend = [if (trial.blueincongruent.correct) {values.countcorrect_incongruent += 1; values.sumrt_incongruent += trial.blueincongruent.latency}] </trial>
The above /ontrialend logic is executed under the condition that the response given was *correct*. Since "no response" (and thus the trial timing out) is not a correct response, that trial's latency would in fact not be added to values.sumrt_incongruent. You can run this analogous snippet to see this for yourself on-screen:
<values> / sumrt = 0 </values>
<block myblock> / trials = [1-10=mytrial] </block>
<trial mytrial> / stimulusframes = [1=mytext] / validresponse = ("d", "k") / correctresponse = ("k") / timeout = 2000 / ontrialend = [if (trial.mytrial.correct) {values.sumrt+=trial.mytrial.latency; }; ] </trial>
<text mytext> / items = ("Response on previous trial: <%trial.mytrial.response%> | Sum of latency: <%values.sumrt%>") </text>
I assume I'm missing something here, so it would be great if you could elaborate.
EDITED TO ADD: I should perhaps note that the latency of timed-out trials *will* be included in some built-in properties aggregate properties (e.g. trial.blueincongruent.meanlatency). Those aggregate properties must be avoided in cases where you only want to include latencies under certain conditions (e.g., only when a response *did* occur, or only for correct responses, etc.). Instead, calculate the desired aggregates by using <values> entries and <expressions>. Taking the above example, you would calculate the mean rt *excluding* timed-out trials like this:
<values> / sumrt = 0 / nresponses = 0 </values>
<expressions> / meanrt_response_only = (values.sumrt/values.nresponses) </expressions>
<block myblock> / postinstructions = (results) / trials = [1-10=mytrial] </block>
<trial mytrial> / stimulusframes = [1=mytext] / validresponse = ("d", "k") / correctresponse = ("k") / timeout = 2000 / ontrialend = [if (trial.mytrial.response != 0) {values.sumrt+=trial.mytrial.latency; values.nresponses+=1}; ] </trial>
<text mytext> / items = ("Response on previous trial: <%trial.mytrial.response%> | Sum of latency: <%values.sumrt%> | N: <%values.nresponses%> | Mean RT: <%expressions.meanrt_response_only%>") </text>
<page results> ^^Results after 10 trials: ^^Sum of latency: <%values.sumrt%> | N: <%values.nresponses%> | Mean RT: <%expressions.meanrt_response_only%> </page>
In general, what you can do is check whether the trial's response property is 0 (=no response occurred) or not.
/ ontrialend = [if (trial.blueincongruent.response == 0) {values.ommisionerrors += 1; ...} ]
would count an ommission error if no response was given.
/ ontrialend = [if (trial.blueincongruent.response != 0) {....; } ]
would execute logic under the condition that *some* response was received (i.e, "not no response").
|