﻿<?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  » Noreplace behavior</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Sun, 27 Sep 2026 05:56:39 GMT</lastBuildDate><ttl>20</ttl><item><title>Noreplace behavior</title><link>https://forums.millisecond.com/Topic21222.aspx</link><description>I'm a bit confused how the behavior of noreplace works. I set up my experiment such that the number of items per type of trial should add up to the number of trials I'm asking the block to fill. In the below example, shopping_trial has 14 unique trials, discount_trial has 6 unique trials, and gender_trial has 8 unique trials. Trials are set up to run paired stimuli (using the index selected of 1 of the stimuli), with the base stimuli being set to noreplace. However, when this runs, it seems to ignore the noreplace, duplicating some of these trials and not reaching the full 14 shopping trials (presumably, there's a 33% chance of each trial occurring regardless of the replacement status).&lt;br/&gt;&lt;br/&gt;Here is some abridged code to show how this is set up:&lt;br/&gt;&lt;br/&gt;&amp;lt;item discount1&amp;gt;&lt;br/&gt;/1 =  "Stimuli/sprite.jpg"&lt;br/&gt;/2 =  "Stimuli/tropicana_oj.jpg"&lt;br/&gt;&lt;br/&gt;/3 =  "Stimuli/philadelphia_cream_cheese.jpg"&lt;br/&gt;/4 =  "Stimuli/store_paper_towels.png"&lt;br/&gt;&lt;br/&gt;/5 =  "Stimuli/chicken_breast2.jpg"&lt;br/&gt;/6 = "Stimuli/strawberries2.jpg"&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture discount1&amp;gt;&lt;br/&gt;/ items = discount1&lt;br/&gt;/ select = noreplace&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;picture discount2&amp;gt;&lt;br/&gt;/ items = discount2&lt;br/&gt;/ select = current(discount1)&lt;br/&gt;&amp;lt;/picture&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial discount_trial&amp;gt;&lt;br/&gt;/ stimulusframes = [1 = discount1, discount2]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;--------------------------&lt;br/&gt;&lt;br/&gt;&amp;lt;block november&amp;gt;&lt;br/&gt;/ bgstim = (zreminder, mreminder)&lt;br/&gt;/ trials = [1-28 = noreplace(shopping_trial, discount_trial, gender_trial)]&lt;br/&gt;/ errormessage = false&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;Is there any way to make it pick exactly 14, 6, and 8, while also forcing it to randomize the order of the presentation of these trials?</description><pubDate>Wed, 29 Mar 2017 16:01:46 GMT</pubDate><dc:creator>mzhang13</dc:creator></item><item><title>RE: Noreplace behavior</title><link>https://forums.millisecond.com/Topic21224.aspx</link><description>&lt;div data-id="21223" class="if-quote-wrapper" unselectable="on" data-guid="1490827815634"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="21223" 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="21223" 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="21223" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;mzhang13 - Wednesday, March 29, 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-21223"&gt;&lt;div class="if-quote-message-margin"&gt;Update: Think I figured out by manually making a list and using that instead:&lt;br/&gt;&lt;br/&gt;&amp;lt;list november_list&amp;gt;&lt;br/&gt;/ items = (trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial,&lt;br/&gt;trial.discount_trial, trial.discount_trial, trial.discount_trial, trial.discount_trial, trial.discount_trial, trial.discount_trial, trial.gender_trial, trial.gender_trial, trial.gender_trial, trial.gender_trial, trial.gender_trial, trial.gender_trial, trial.gender_trial, trial.gender_trial)&lt;br/&gt;/ poolsize = 28&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block november&amp;gt;&lt;br/&gt;/ bgstim = (zreminder, mreminder)&lt;br/&gt;/ trials = [1-28 = list.november_list] &lt;br/&gt;/ errormessage = false&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="21223"&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;To elaborate on this and provide an explanation: Sampling *stimuli* and sampling *trials* are two separate things:&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("A", "B", "C")&lt;br/&gt;/ select = noreplace&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;will sample from the 3 items randomly, without replacement. I.e. if you run&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;...&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;three times&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1-3 = mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;you'll end up seeing A once, B once, and C once.&lt;br/&gt;&lt;br/&gt;Now, what noreplace() in a &amp;lt;block&amp;gt;'s /trials attribute does is sample from *&amp;lt;trial&amp;gt;* elements. What matters here are the proportions entered into the noreplace() selection pool.&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;&lt;strong&gt;/ trials = [1-12 = noreplace(atrial, btrial, ctrial)]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;means sample the three trial elements -- atrial, btrial, ctrial -- in *equal* proportions. You'll end up with&lt;br/&gt;- 4 x atrial,&lt;br/&gt;- 4 x btrial, and&lt;br/&gt;- 4 x ctrial&lt;br/&gt;in random order.&lt;br/&gt;&lt;br/&gt;With &lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;&lt;strong&gt;/ trials = [1-12 = noreplace(atrial, btrial, ctrial, ctrial)]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;you would end up with *twice* as many ctrials compared to atrials and btrials, i.e.&lt;br/&gt;- 3 x atrial,&lt;br/&gt;- 3 x btrial, and&lt;br/&gt;- 6 x ctrial&lt;br/&gt;in random order.&lt;br/&gt;&lt;br/&gt;In other words, you need to enter the correct amount of each trial-type into the selection pool. Hope this clarifies.&lt;br/&gt;</description><pubDate>Wed, 29 Mar 2017 16:01:46 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Noreplace behavior</title><link>https://forums.millisecond.com/Topic21223.aspx</link><description>Update: Think I figured out by manually making a list and using that instead:&lt;br/&gt;&lt;br/&gt;&amp;lt;list november_list&amp;gt;&lt;br/&gt;/ items = (trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial, trial.shopping_trial,&lt;br/&gt;trial.discount_trial, trial.discount_trial, trial.discount_trial, trial.discount_trial, trial.discount_trial, trial.discount_trial, trial.gender_trial, trial.gender_trial, trial.gender_trial, trial.gender_trial, trial.gender_trial, trial.gender_trial, trial.gender_trial, trial.gender_trial)&lt;br/&gt;/ poolsize = 28&lt;br/&gt;&amp;lt;/list&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block november&amp;gt;&lt;br/&gt;/ bgstim = (zreminder, mreminder)&lt;br/&gt;/ trials = [1-28 = list.november_list] &lt;br/&gt;/ errormessage = false&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;</description><pubDate>Wed, 29 Mar 2017 14:31:42 GMT</pubDate><dc:creator>mzhang13</dc:creator></item></channel></rss>