﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 4  » how to exclude timeout trials in latency?</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Fri, 11 Sep 2026 03:20:35 GMT</lastBuildDate><ttl>20</ttl><item><title>how to exclude timeout trials in latency?</title><link>https://forums.millisecond.com/Topic17711.aspx</link><description>Hi, i am programing my own version of the color shape task with Inquisit 4 Lab and I would like Inquisit NOT to count timeout ms to the parameter "latency"&amp;nbsp; of trials that have run out due to timeout. With the following script, Inquisit still counts the timeout to the latency. But I want to exclude the ms of timeout trials to the latency counting. But I can't just count those trials as invalid because I need to count them as omission errors.&lt;br/&gt;How do I script that?&lt;br/&gt;Exclude timeout trials from being counted to the latency and frnakly to the meanRT, and so on...&lt;br/&gt;And still count timeout trials as omission errors?&lt;br/&gt;&lt;br/&gt;This is a tiny part of the script, but I think somewhere under "/ontrialend" I am missing some commands...&lt;br/&gt;&lt;br/&gt;&amp;lt;trial blueincongruent&amp;gt; &lt;br/&gt;/ontrialbegin = [values.count_incongruent += 1]&lt;br/&gt;/ontrialbegin = [values.congruency = 2]&lt;br/&gt;/ pretrialpause = 200&lt;br/&gt;/ stimulustimes = [0= fixation; 500=blueincongruent]&lt;br/&gt;/ correctresponse = ("j")&lt;br/&gt;/ validresponse = ("d", "f", "j", "k")&lt;br/&gt;/ timeout = 2000&lt;br/&gt;/ errormessage = true(x, 400)&lt;br/&gt;/ontrialend = [if (trial.blueincongruent.correct) {values.countcorrect_incongruent += 1; values.sumrt_incongruent += trial.blueincongruent.latency}]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;I would be very thankful for some help.&lt;br/&gt;&lt;br/&gt;Kind regards, Ulrike&lt;br/&gt;</description><pubDate>Fri, 13 Nov 2015 02:04:12 GMT</pubDate><dc:creator>Ulrike Nestler</dc:creator></item><item><title>RE: how to exclude timeout trials in latency?</title><link>https://forums.millisecond.com/Topic17716.aspx</link><description>Hi Dave,&lt;br/&gt;&lt;br/&gt;the second scenario is exactly what i meant with my question. Thanks so much for your detailed answer! I will add your improvements to the script today and see if it works. ;-)&lt;br/&gt;Thanks so much again for your fast response!&lt;br/&gt;Kind regards,&lt;br/&gt;Ulrike&lt;br/&gt;</description><pubDate>Fri, 13 Nov 2015 02:04:12 GMT</pubDate><dc:creator>Ulrike Nestler</dc:creator></item><item><title>RE: how to exclude timeout trials in latency?</title><link>https://forums.millisecond.com/Topic17713.aspx</link><description>&amp;gt; With the following script, Inquisit still counts the timeout to the latency.&lt;br/&gt;&lt;br/&gt;What makes you think that?&lt;br/&gt;&lt;br/&gt;&amp;lt;trial blueincongruent&amp;gt; &lt;br/&gt;...&lt;br/&gt;/ontrialend = [if &lt;strong&gt;(trial.blueincongruent.correct&lt;/strong&gt;) {values.countcorrect_incongruent += 1; &lt;strong&gt;values.sumrt_incongruent += trial.blueincongruent.latency&lt;/strong&gt;}]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;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:&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ sumrt = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-10=mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = ("d", "k")&lt;br/&gt;/ correctresponse = ("k")&lt;br/&gt;/ timeout = 2000&lt;br/&gt;/ ontrialend = [if (trial.mytrial.correct) {values.sumrt+=trial.mytrial.latency; }; ]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("Response on previous trial: &amp;lt;%trial.mytrial.response%&amp;gt; | Sum of latency: &amp;lt;%values.sumrt%&amp;gt;")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;I assume I'm missing something here, so it would be great if you could elaborate. &lt;br/&gt;&lt;br/&gt;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.&lt;strong&gt;meanlatency&lt;/strong&gt;). 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 &amp;lt;values&amp;gt; entries and &amp;lt;expressions&amp;gt;. Taking the above example, you would calculate the mean rt *excluding* timed-out trials like this:&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ sumrt = 0&lt;br/&gt;/ nresponses = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expressions&amp;gt;&lt;br/&gt;/ meanrt_response_only = (values.sumrt/values.nresponses)&lt;br/&gt;&amp;lt;/expressions&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ postinstructions = (results)&lt;br/&gt;/ trials = [1-10=mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = ("d", "k")&lt;br/&gt;/ correctresponse = ("k")&lt;br/&gt;/ timeout = 2000&lt;br/&gt;/ ontrialend = [if (trial.mytrial.response != 0) {values.sumrt+=trial.mytrial.latency; values.nresponses+=1}; ]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("Response on previous trial: &amp;lt;%trial.mytrial.response%&amp;gt; | Sum of latency: &amp;lt;%values.sumrt%&amp;gt; | N: &amp;lt;%values.nresponses%&amp;gt; | Mean RT: &amp;lt;%expressions.meanrt_response_only%&amp;gt;")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;page results&amp;gt;&lt;br/&gt;^^Results after 10 trials:&lt;br/&gt;^^Sum of latency: &amp;lt;%values.sumrt%&amp;gt; | N: &amp;lt;%values.nresponses%&amp;gt; | Mean RT: &amp;lt;%expressions.meanrt_response_only%&amp;gt;&lt;br/&gt;&amp;lt;/page&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;In general, what you can do is check whether the trial's response property is 0 (=no response occurred) or not.&lt;br/&gt;&lt;br/&gt;/ ontrialend = [if (trial.blueincongruent.response == 0) {values.ommisionerrors += 1; ...} ]&lt;br/&gt;&lt;br/&gt;would count an ommission error if no response was given.&lt;br/&gt;&lt;br/&gt;/ ontrialend = [if (trial.blueincongruent.response != 0) {....; } ]&lt;br/&gt;&lt;br/&gt;would execute logic under the condition that *some* response was received (i.e, "not no response").&lt;br/&gt;</description><pubDate>Thu, 12 Nov 2015 10:26:19 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: how to exclude timeout trials in latency?</title><link>https://forums.millisecond.com/Topic17712.aspx</link><description>Correction: My questions and the script refers to my own Stroop Version and not Color Shape.&lt;br/&gt;Thanks.&lt;br/&gt;</description><pubDate>Thu, 12 Nov 2015 09:14:39 GMT</pubDate><dc:creator>Ulrike Nestler</dc:creator></item></channel></rss>