﻿<?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 5  » Conditional repeating of trial (and corresponding item selections)</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 09 Apr 2026 20:10:50 GMT</lastBuildDate><ttl>20</ttl><item><title>Conditional repeating of trial (and corresponding item selections)</title><link>https://forums.millisecond.com/Topic21646.aspx</link><description>I'm trying to program an experiment where on each trial, a grid of 4 images is presented, after which a single image is shown as a comparison. &amp;nbsp;Each of the images is assigned a value for its brightness from -3 [lowest brightness] to 3 [highest brightness] (so each image has a value of -3, -2, -1, 0, 1, 2, or 3). &amp;nbsp;The subjects' task is to say whether the single image is more or less than the collective average brightness of the 4 grid images that came right before it.&lt;br/&gt;&lt;br/&gt;So, there are 2 requirements:&lt;br/&gt;1 = The program has to randomly select 5 images on each trial -- 4 grid, 1 compare&lt;br/&gt;2 = The average of the 4 grid images must be different than the 1 compare image -- if not, it has to resample the 5 image stimuli and only present the trial when that's true&lt;br/&gt;&lt;br/&gt;Is there a particularly elegant way to do this in Inquisit? &amp;nbsp;I was thinking about assigning values to the images within Inquisit based on what item numbers are randomly selected, but I'm not sure how to implement the part where Inquisit checks the comparison of the averages for grid images vs. compare image, and resample the image items if the condition isn't met.&lt;br/&gt;&lt;br/&gt;Any help would be much appreciated. &amp;nbsp;Thanks so much!</description><pubDate>Thu, 25 May 2017 09:24:41 GMT</pubDate><dc:creator>ewc2138</dc:creator></item><item><title>RE: Conditional repeating of trial (and corresponding item selections)</title><link>https://forums.millisecond.com/Topic21686.aspx</link><description>Hi Dave,&lt;br/&gt;&lt;br/&gt;Thanks for the reply! &amp;nbsp;I think I got it now ...&lt;br/&gt;&lt;br/&gt;</description><pubDate>Thu, 25 May 2017 09:24:41 GMT</pubDate><dc:creator>ewc2138</dc:creator></item><item><title>RE: Conditional repeating of trial (and corresponding item selections)</title><link>https://forums.millisecond.com/Topic21650.aspx</link><description>&lt;div data-id="21649" class="if-quote-wrapper" unselectable="on" data-guid="1495492498400"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21649" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="21649" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="21649" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;ewc2138 - Monday, May 22, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21649"&gt;&lt;div class="if-quote-message-margin"&gt;Thanks for the reply! &amp;nbsp;To repeat the trial sampling of the images if the check fails, would you use the "notrial" option in the branch attribute? &amp;nbsp;&lt;a href="http://www.millisecond.com/support/docs/v5/html/language/attributes/branch.htm"&gt;&lt;a href="http://www.millisecond.com/support/docs/v5/html/language/attributes/branch.htm"&gt;http://www.millisecond.com/support/docs/v5/html/language/attributes/branch.htm&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Or is there another better way to do this? &amp;nbsp;I also need to make sure that there are exactly 200 valid trials for each subject, so if the check fails, I wouldn't want that to count towards the total trials for that subject.&lt;a class="if-quote-goto quote-link" href="#" data-id="21649"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;I don't think the /branch'ing would be required at all, and hence I see no obvious need or use for the "notrial" stub. If you handle all the selection stuff /ontrialbegin / use an expression that repeats until it gets a valid result (cf. the example linked previously), there should be no need to abort or repeat a trial. And consequently ensuring 200 (valid) trials total per subject should not pose a problem either.&lt;br/&gt;</description><pubDate>Mon, 22 May 2017 15:38:00 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Conditional repeating of trial (and corresponding item selections)</title><link>https://forums.millisecond.com/Topic21649.aspx</link><description>Thanks for the reply! &amp;nbsp;To repeat the trial sampling of the images if the check fails, would you use the "notrial" option in the branch attribute? &amp;nbsp;&lt;a href="http://www.millisecond.com/support/docs/v5/html/language/attributes/branch.htm"&gt;http://www.millisecond.com/support/docs/v5/html/language/attributes/branch.htm&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Or is there another better way to do this? &amp;nbsp;I also need to make sure that there are exactly 200 valid trials for each subject, so if the check fails, I wouldn't want that to count towards the total trials for that subject.</description><pubDate>Mon, 22 May 2017 14:57:01 GMT</pubDate><dc:creator>ewc2138</dc:creator></item><item><title>RE: Conditional repeating of trial (and corresponding item selections)</title><link>https://forums.millisecond.com/Topic21648.aspx</link><description>&lt;div data-id="21646" class="if-quote-wrapper" unselectable="on" data-guid="1495476125081"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21646" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="21646" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="21646" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;ewc2138 - Monday, May 22, 2017&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-21646"&gt;&lt;div class="if-quote-message-margin"&gt;I'm trying to program an experiment where on each trial, a grid of 4 images is presented, after which a single image is shown as a comparison. &amp;nbsp;Each of the images is assigned a value for its brightness from -3 [lowest brightness] to 3 [highest brightness] (so each image has a value of -3, -2, -1, 0, 1, 2, or 3). &amp;nbsp;The subjects' task is to say whether the single image is more or less than the collective average brightness of the 4 grid images that came right before it.&lt;br/&gt;&lt;br/&gt;So, there are 2 requirements:&lt;br/&gt;1 = The program has to randomly select 5 images on each trial -- 4 grid, 1 compare&lt;br/&gt;2 = The average of the 4 grid images must be different than the 1 compare image -- if not, it has to resample the 5 image stimuli and only present the trial when that's true&lt;br/&gt;&lt;br/&gt;Is there a particularly elegant way to do this in Inquisit? &amp;nbsp;I was thinking about assigning values to the images within Inquisit based on what item numbers are randomly selected, but I'm not sure how to implement the part where Inquisit checks the comparison of the averages for grid images vs. compare image, and resample the image items if the condition isn't met.&lt;br/&gt;&lt;br/&gt;Any help would be much appreciated. &amp;nbsp;Thanks so much!&lt;a class="if-quote-goto quote-link" href="#" data-id="21646"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;&amp;gt; I was thinking about assigning values to the images within Inquisit based on what item numbers are randomly selected&lt;br/&gt;&lt;br/&gt;This intuitively seems to be the right approach to me.&lt;br/&gt;&lt;br/&gt;&amp;gt; but I'm not sure how to implement the part where Inquisit checks the comparison of the averages for grid images vs. compare image, and resample the image items if the &lt;br/&gt;&amp;gt; condition isn't met.&lt;br/&gt;&lt;br/&gt;This should be doable using some &amp;lt;expressions&amp;gt; and/or /ontrialbegin logic: Sample item numbers, check the associated values and compare, if check fails: repeat. See e.g. &lt;a href="https://www.millisecond.com/forums/Topic7122.aspx"&gt;https://www.millisecond.com/forums/Topic7122.aspx&lt;/a&gt; for something abstractly related: Finding an item that was not recently presented.&lt;br/&gt;</description><pubDate>Mon, 22 May 2017 11:06:03 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>