﻿<?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  » Problem in the database when using a Stroop Task</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Tue, 14 Apr 2026 09:19:15 GMT</lastBuildDate><ttl>20</ttl><item><title>Problem in the database when using a Stroop Task</title><link>https://forums.millisecond.com/Topic12986.aspx</link><description>Hello, &lt;div&gt;&lt;br/&gt;&lt;/div&gt;I've downloaded and modified the Stroop script that is provided by your website for an experiment. I've noticed an important problem in the database and would like to know if there is a simple way to fix it.&lt;div&gt;&lt;br/&gt;&lt;/div&gt;As a reminder, a Stroop task randomly displays congruent and incongruent trials. You can see in the screenshot below that, instead of reporting a blank in the congruent column when displaying an incongruent trial, it copies the value of the previous congruent column. The highlighted cases are the problematic ones.&lt;br/&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;br/&gt;&lt;img src="http://q4demos.free.fr/Canada/asitis.png" alt="http://q4demos.free.fr/Canada/asitis.png"&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;div&gt;Copying the previous value is actually creating false means (as it duplicates values) and hence, completely messes up the data. I'd like it to report a blank in the congruent column when displaying an incongruent trail (as shown below). Is there a way to do this ??&lt;/div&gt; &lt;img src="http://q4demos.free.fr/Canada/asiwantittobe.png" alt="http://q4demos.free.fr/Canada/asiwantittobe.png" /&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;div&gt;Thanks for your help. &lt;div&gt;&lt;br/&gt;&lt;/div&gt;Regards, Vincent.&lt;br/&gt;&lt;/div&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;</description><pubDate>Thu, 17 Apr 2014 09:24:17 GMT</pubDate><dc:creator>vpillaud</dc:creator></item><item><title>RE: Problem in the database when using a Stroop Task</title><link>https://forums.millisecond.com/Topic13053.aspx</link><description>All that's already in the data file. You have the latency column and you have stimulusitem columns (unless you've explicitly excluded them)&lt;br/&gt;</description><pubDate>Thu, 17 Apr 2014 09:24:17 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Problem in the database when using a Stroop Task</title><link>https://forums.millisecond.com/Topic13052.aspx</link><description>btw, is there a possibility to print the latencies per stimuli in the raw data file ?&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;br/&gt;</description><pubDate>Thu, 17 Apr 2014 09:22:22 GMT</pubDate><dc:creator>vpillaud</dc:creator></item><item><title>RE: Problem in the database when using a Stroop Task</title><link>https://forums.millisecond.com/Topic13033.aspx</link><description>I see. Thanks for this clear explanation.&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;Best, &lt;div&gt;&lt;br/&gt;&lt;/div&gt;Vincent.&lt;br/&gt;</description><pubDate>Wed, 16 Apr 2014 12:21:28 GMT</pubDate><dc:creator>vpillaud</dc:creator></item><item><title>RE: Problem in the database when using a Stroop Task</title><link>https://forums.millisecond.com/Topic13030.aspx</link><description>Vincent,&lt;div&gt;expressions.congruentRT = meanlatency(trial.bluecongruent, trial.redcongruent)&lt;div&gt;&lt;br/&gt;&lt;/div&gt;means whatever the expression in your data file contains in a given line *is the mean at this given point in time*. What you are calculating manually is thus the "mean of means", which of course does not make any sense.&lt;div&gt;&lt;br/&gt;&lt;/div&gt;If you want to manually check the results of the expressions, you ought to sum up the raw latencies in the data file's 'latency' column by trial type (sum up latencies for congruent trials, sum up latencies for incongruent trials) and divide the respective sums by the appropriate number of trials (i.e., number of congruent trials, number of incongruent trials).&lt;div&gt;&lt;br/&gt;&lt;/div&gt;In a nutshell:&lt;div&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-20=noreplace(a1,a2,b1,b2)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ a_rtsum = 0&lt;br/&gt;/ a_ntrials = 0&lt;br/&gt;/ b_rtsum = 0&lt;br/&gt;/ b_ntrials = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expressions&amp;gt;&lt;br/&gt;/ a_meanrt = (values.a_rtsum / values.a_ntrials)&lt;br/&gt;/ a_meanrt2 = meanlatency(trial.a1, trial.a2)&lt;br/&gt;/ b_meanrt = (values.b_rtsum / values.b_ntrials)&lt;br/&gt;/ b_meanrt2 = meanlatency(trial.b1, trial.b2)&lt;br/&gt;&amp;lt;/expressions&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial a1&amp;gt;&lt;br/&gt;/ ontrialend = [values.a_ntrials += 1; values.a_rtsum += trial.a1.latency]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial a2&amp;gt;&lt;br/&gt;/ ontrialend = [values.a_ntrials += 1; values.a_rtsum += trial.a2.latency]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial b1&amp;gt;&lt;br/&gt;/ ontrialend = [values.b_ntrials += 1; values.b_rtsum += trial.b1.latency]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial b2&amp;gt;&lt;br/&gt;/ ontrialend = [values.b_ntrials += 1; values.b_rtsum += trial.b2.latency]&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%script.currenttrial%&amp;gt;")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&amp;nbsp;&lt;br/&gt;&amp;lt;data&amp;gt;&lt;br/&gt;/ columns = [trialnum, trialcode, response, latency, &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.a_rtsum, values.a_ntrials, expressions.a_meanrt, expressions.a_meanrt2,&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.b_rtsum, values.b_ntrials, expressions.b_meanrt, expressions.b_meanrt2,&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;br/&gt;&amp;lt;/data&amp;gt;&lt;br/&gt;&lt;/div&gt;&lt;br/&gt;&lt;/div&gt;</description><pubDate>Wed, 16 Apr 2014 10:10:13 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Problem in the database when using a Stroop Task</title><link>https://forums.millisecond.com/Topic13029.aspx</link><description>ok. By now, there are two control trials and twelve trials (either congruent or incongruent) in the script. It'll be modified later on.&lt;div&gt;&lt;br/&gt;&lt;/div&gt;The two zeros at the beginning are thus due to the control trials.&lt;br/&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;br/&gt;&lt;img src="http://q4demos.free.fr/Canada/pb.png" alt="http://q4demos.free.fr/Canada/pb.png" /&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;div&gt;In its summary, Inquisit reports a mean of 1099 for the congruent items and 740.66 for the incongruent in this example. However, when i compute the mean myself, including or excluding the two zeros, I never obtain the same value (as shown in the screenshot). &lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;div&gt;The means displayed in the summary are computed as:&lt;br/&gt;&lt;/div&gt;expressions.congruentRT = meanlatency(trial.bluecongruent, trial.redcongruent)&lt;div&gt;&lt;br/&gt;&lt;/div&gt;I cannot find the values of the trial.bluecongruent and trial.redcongruent in the raw datafile (they are not saved). Hence, I couldnt check if something was wrong at this level. Am I computing the means in a wrong way ? (such as not using the right values for it for instance).&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;div&gt;Thanks for your help, really appreciate.&lt;div&gt;&lt;br/&gt;&lt;/div&gt;Vincent&lt;br/&gt;&lt;/div&gt;&lt;br/&gt;&lt;div&gt;&lt;br/&gt;&lt;/div&gt;&lt;br/&gt;&lt;/div&gt;</description><pubDate>Wed, 16 Apr 2014 10:00:26 GMT</pubDate><dc:creator>vpillaud</dc:creator></item><item><title>RE: Problem in the database when using a Stroop Task</title><link>https://forums.millisecond.com/Topic13028.aspx</link><description>Please do.&lt;br/&gt;</description><pubDate>Wed, 16 Apr 2014 09:11:14 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Problem in the database when using a Stroop Task</title><link>https://forums.millisecond.com/Topic13027.aspx</link><description>wished it was the case but unfortunately it is not. The reported mean does not correspond to the average of the separated latencies... &lt;div&gt;&lt;br/&gt;&lt;/div&gt;I can give you the data if you want me too.&lt;br/&gt;</description><pubDate>Wed, 16 Apr 2014 08:41:26 GMT</pubDate><dc:creator>vpillaud</dc:creator></item><item><title>RE: Problem in the database when using a Stroop Task</title><link>https://forums.millisecond.com/Topic12987.aspx</link><description>No, nothing is duplicated here and no means are distorted in any way either. These expressions *are* the respective means given the data up to the given point in time. And since the mean for congruent trials does not change during incongruent trials the value remains the same.&lt;br/&gt;</description><pubDate>Mon, 14 Apr 2014 14:25:30 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>