﻿<?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  » Repeat Error Trial Tutorial  (Millisecond Software)</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 30 Apr 2026 05:10:35 GMT</lastBuildDate><ttl>20</ttl><item><title>Repeat Error Trial Tutorial  (Millisecond Software)</title><link>https://forums.millisecond.com/Topic14630.aspx</link><description>For some experiments it's necessary to repeat error trials at a later point (and not necessarily right away). &lt;br/&gt;Attached to this message is one Millisecond Software tutorial script that runs one possible repetition procedure.&lt;br/&gt;&lt;br/&gt;The example task is simple: the computer presents 'A' stimuli (A1, A2, A3, A4) and 'B' stimuli (B1, B2, B3, B4)&lt;br/&gt;and the task is to press the 'A' key if it's an A-stimuli and the 'B' key if it's a B-stimuli.&lt;br/&gt;&lt;br/&gt;If a mistake is made (Example: you see 'A1' and press the B-key), the trial is repeated at later point which is randomly determined. &lt;br/&gt;The procedure ends if all stimuli have been categorized correctly.&lt;br/&gt;&amp;nbsp;&lt;br/&gt;The example repetition procedure takes advantage of lists and the ability to edit while the script is running:&lt;br/&gt;&lt;br/&gt;&lt;span&gt;[code language="xml"]&lt;/span&gt;&lt;span&gt;&amp;lt;list grouptype&amp;gt;&lt;br/&gt;/items = (1, 1, 1, 1, 2, 2, 2, 2)&lt;br/&gt;/replace = false&lt;br/&gt;&amp;lt;/list&amp;gt;[/code]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;List.grouptype controls whether an A-trial (1) or a B-trial (2) is presented. The trialtype is determined randomly without replacement.&lt;br/&gt;&lt;br/&gt;&lt;span&gt;[code language="xml"]&lt;/span&gt;&lt;span&gt;&amp;lt;list groupA&amp;gt;&lt;br/&gt;/items = (1, 2, 3, 4)&lt;br/&gt;/replace = false&lt;br/&gt;&amp;lt;/list&amp;gt;[/code]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;List.groupA controls which particular A stimulus (A1, A2, A3 or A4) is going to be presented during an A-trial. The list items are drawn randomly without replacement. &lt;br/&gt;&lt;br/&gt;&lt;span&gt;[code language="xml"]&lt;/span&gt;&lt;span&gt;&amp;lt;list groupB&amp;gt;&lt;br/&gt;/items = (1, 2, 3, 4)&lt;br/&gt;/replace = false&lt;br/&gt;&amp;lt;/list&amp;gt;[/code]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;List.groupB controls which particular B stimulus (B1, B2, B3 or B4) is going to be presented during a B-trial. The list items are drawn randomly without replacement. &lt;br/&gt;&lt;br/&gt;All list elements look pretty static at this point. But thankfully they are not. All item lists can still be edited during runtime.&lt;br/&gt;&lt;br/&gt;For example, if a mistake was made and stimulus A1 was classified as a B-stimulus, the following trial code ensures that the trial will be repeated at a later point:&lt;br/&gt;&lt;span&gt;[code language="xml"]&lt;/span&gt;&lt;span&gt;/ontrialend = [if (trial.showgroupA.error) {&lt;br/&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;insert(list.grouptype, 1, list.grouptype.itemcount + 1);&lt;br/&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;insert(list.groupA, text.groupA.currentitemnumber, list.groupA.itemcount + 1)}][/code]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;List.grouptype gets another A-trial to run: insert(list.grouptype, 1, list.grouptype.itemcount + 1)&lt;br/&gt;List.groupA gets another A1 stimulus to run: insert(list.groupA, text.groupA.currentitemnumber, list.groupA.itemcount + 1)&lt;br/&gt;&lt;br/&gt;The new items are inserted into the relevant lists at the very end of the list (they could be inserted at position 1 of the lists as well as the items are drawn&lt;br/&gt;randomly).&lt;br/&gt;&lt;br/&gt;And that's it. The basic idea is to take advantage of being able to edit list items when the script is run.&lt;br/&gt;If you have any further questions, please, let us know.&lt;br/&gt;&lt;br/&gt;cheers,&lt;br/&gt;katja from Millisecond Software&lt;br/&gt;&lt;br/&gt;</description><pubDate>Wed, 15 Oct 2014 11:35:13 GMT</pubDate><dc:creator>katbo</dc:creator></item></channel></rss>