﻿<?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  » Integrating a pre-defined randomization list in script</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 24 Sep 2026 20:47:38 GMT</lastBuildDate><ttl>20</ttl><item><title>Integrating a pre-defined randomization list in script</title><link>https://forums.millisecond.com/Topic19661.aspx</link><description>Hi&lt;br/&gt; We’re planning a study that includes 3 versions of a GO/NoGo Task with Inquisit web. These versions only differ regarding the GO/NoGo ratio. Is it possible to include these 3 versions within one script and that participants&amp;nbsp;are assigned to one of the three conditions at login&amp;nbsp;?&lt;br/&gt; Our idea is that the script includes a list (i.e. our randomization list, which is pre-defined according to a stratified randomization strategy) in which participant numbers are assigned to one of the three conditions (e.g. participant 001 = condition 3, participant 006 = condition 2, participant 134 = condition 3). We would like for the participant to log in with his/her number and automatically be presented with the assigned condition. Does anybody have an idea what could be done here?&lt;br/&gt; Thanks in advance for your advice&amp;nbsp;!&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 11 Jul 2017 17:46:37 GMT</pubDate><dc:creator>thestruggleisreal</dc:creator></item><item><title>RE: Integrating a pre-defined randomization list in script</title><link>https://forums.millisecond.com/Topic22070.aspx</link><description>&lt;div data-id="22069" class="if-quote-wrapper" unselectable="on" data-guid="1499820260504"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="22069" 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="22069" 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="22069" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;AnnaSchimm - Tuesday, July 11, 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-22069"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="19663" class="if-quote-wrapper" unselectable="on" data-guid="1499820260504"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="19663" 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="19663" 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="19663" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Wednesday, September 7, 2016&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-19663"&gt;&lt;div class="if-quote-message-margin"&gt;You should set up a &amp;lt;batch&amp;gt; script like so.&lt;br/&gt;&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (1 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "a.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (2 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "b.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (3 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "c.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;where a, b and c.iqx are your three versions / conditions of the go-nogo. Call the file containing the 3 &amp;lt;batch&amp;gt; elements "batch.iqx" and register it as your active web script (you upload then "actual" scripts a to c in the next step along with any other files those scripts need).&lt;br/&gt;&lt;br/&gt;Configure your web experiment to read both the subject id AND the group id from URL query parameters. You can then ensure that a given subject receives the proper, pre-assigned condition by simply giving them an individualized link:&lt;br/&gt;&lt;br/&gt;&lt;a href="https://research.millisecond.com/yourusername/batch.web?subjectid=1&amp;amp;groupid=3"&gt;&lt;a href="https://research.millisecond.com/yourusername/batch.web?subjectid=1&amp;amp;groupid=3"&gt;https://research.millisecond.com/yourusername/batch.web?subjectid=1&amp;amp;groupid=3&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;and so forth.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="19663"&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;Does this also work if I am counterbalancing the order of 3 tasks, thus 6 groups? ex:&lt;br/&gt;&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (1 of 6)&lt;br/&gt;/groupassignment = groupnumber&lt;br/&gt;/ file = "practice.iqx"&lt;br/&gt;/ file = "negative.iqx"&lt;br/&gt;/ file = "neutral.iqx"&lt;br/&gt;/ file = "color.iqx"&lt;br/&gt;/ file = "end.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (2 of 6)&lt;br/&gt;/groupassignment = groupnumber&lt;br/&gt;/ file = "practice.iqx"&lt;br/&gt;/ file = "negative and neutral.iqx"&lt;br/&gt;/ file = "color word.iqx"&lt;br/&gt;/ file = "neutral.iqx"&lt;br/&gt;/ file = "end.iqx"&lt;br/&gt;&lt;br/&gt;etc.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;How can I have subjects randomly assigned to each group?&amp;nbsp;&lt;a class="if-quote-goto quote-link" href="#" data-id="22069"&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;It works the same no matter how many groups / conditions there are, whether it be 2, 3, 6, 12, 42 or more.&lt;br/&gt;&lt;br/&gt;&amp;gt; How can I have subjects randomly assigned to each group? &lt;br/&gt;&lt;br/&gt;Assuming you are deploying this online via Inquisit Web, you simply have the launch page generate a random group id (that's the default option anyway).&lt;br/&gt;</description><pubDate>Tue, 11 Jul 2017 17:46:37 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title /><link>https://forums.millisecond.com/Topic22069.aspx</link><description>&lt;div data-id="19663" class="if-quote-wrapper" unselectable="on"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="19663" 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="19663" 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="19663" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Wednesday, September 7, 2016&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-19663"&gt;&lt;div class="if-quote-message-margin"&gt;You should set up a &amp;lt;batch&amp;gt; script like so.&lt;br/&gt;&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (1 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "a.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (2 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "b.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (3 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "c.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;where a, b and c.iqx are your three versions / conditions of the go-nogo. Call the file containing the 3 &amp;lt;batch&amp;gt; elements "batch.iqx" and register it as your active web script (you upload then "actual" scripts a to c in the next step along with any other files those scripts need).&lt;br/&gt;&lt;br/&gt;Configure your web experiment to read both the subject id AND the group id from URL query parameters. You can then ensure that a given subject receives the proper, pre-assigned condition by simply giving them an individualized link:&lt;br/&gt;&lt;br/&gt;&lt;a href="https://research.millisecond.com/yourusername/batch.web?subjectid=1&amp;amp;groupid=3"&gt;&lt;a href="https://research.millisecond.com/yourusername/batch.web?subjectid=1&amp;amp;groupid=3"&gt;https://research.millisecond.com/yourusername/batch.web?subjectid=1&amp;amp;groupid=3&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;and so forth.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="19663"&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;Does this also work if I am counterbalancing the order of 3 tasks, thus 6 groups? ex:&lt;br/&gt;&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (1 of 6)&lt;br/&gt;/groupassignment = groupnumber&lt;br/&gt;/ file = "practice.iqx"&lt;br/&gt;/ file = "negative.iqx"&lt;br/&gt;/ file = "neutral.iqx"&lt;br/&gt;/ file = "color.iqx"&lt;br/&gt;/ file = "end.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (2 of 6)&lt;br/&gt;/groupassignment = groupnumber&lt;br/&gt;/ file = "practice.iqx"&lt;br/&gt;/ file = "negative and neutral.iqx"&lt;br/&gt;/ file = "color word.iqx"&lt;br/&gt;/ file = "neutral.iqx"&lt;br/&gt;/ file = "end.iqx"&lt;br/&gt;&lt;br/&gt;etc.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;How can I have subjects randomly assigned to each group?&amp;nbsp;</description><pubDate>Tue, 11 Jul 2017 10:14:42 GMT</pubDate><dc:creator>AnnaSchimm</dc:creator></item><item><title>RE: Integrating a pre-defined randomization list in script</title><link>https://forums.millisecond.com/Topic19691.aspx</link><description>What &amp;lt;include&amp;gt; does is effectively paste the contents of one file (the one referenced in the &amp;lt;include&amp;gt; element) into another file (the one that contains the &amp;lt;include&amp;gt; element). &amp;lt;include&amp;gt; is the very first thing that gets executed when Inquisit parses a script -- there is no way to have it in a &amp;lt;block&amp;gt; element. I don't see how /branch gets you anywhere here either. If you have two conditions that only differ in their respective &amp;lt;expt&amp;gt; definitions, you'd have&lt;br/&gt;&lt;br/&gt;- One file that contains everything *except* any &amp;lt;expt&amp;gt; element. That file contains your &amp;lt;include&amp;gt; elements.&lt;br/&gt;- Two additional files that each contain the respective &amp;lt;expt&amp;gt; element only -- one file with the &amp;lt;expt&amp;gt; definition for the 1st condition, one file with the &amp;lt;expt&amp;gt; definition for the 2nd condition.&lt;br/&gt;</description><pubDate>Thu, 15 Sep 2016 08:23:42 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Integrating a pre-defined randomization list in script</title><link>https://forums.millisecond.com/Topic19688.aspx</link><description>Thanks for the suggestions.&lt;br/&gt;I am somewhat concerned about equal assignment of conditions, so I am a bit apprehensive to use random assignment.&lt;br/&gt;&lt;br/&gt;The other solution you suggested (precondition) would work if I could do something like:&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid &amp;lt; "5000" ]&lt;br/&gt;/ file = "condition_1.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;We have generated random IDs for participants, but they can be sorted. One more question, can precondition be included in the block element so that I don't have to separate the two conditions into separate files? Or perhaps I could use branch for that? Currently I have for condition 1: &lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ subjects =&amp;nbsp; (1 of 2)&lt;br/&gt;/ groupassignment = subjectnumber&lt;br/&gt;/ preinstructions = (welcome_p)&lt;br/&gt;/ blocks = [1 = consent_b; 2 = practice_b; 3 = subprime_trust_b; 4 = playerA_b; 5 = donation_b]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Thu, 15 Sep 2016 01:09:37 GMT</pubDate><dc:creator>tela</dc:creator></item><item><title>RE: Integrating a pre-defined randomization list in script</title><link>https://forums.millisecond.com/Topic19671.aspx</link><description>Hi again, Dave!&lt;br/&gt;Thank you so much for your help, which is very much appreciated. We'll try what you suggested!&lt;br/&gt;</description><pubDate>Fri, 09 Sep 2016 02:20:20 GMT</pubDate><dc:creator>thestruggleisreal</dc:creator></item><item><title>RE: Integrating a pre-defined randomization list in script</title><link>https://forums.millisecond.com/Topic19667.aspx</link><description>Okay, then you need to make use of conditional &amp;lt;include&amp;gt; elements and list the respective subject ids as /precondition:&lt;br/&gt;&lt;br/&gt;A file called main.iqx would contain something like this:&lt;br/&gt;// subject ids that should be administered condition #1&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "002" || script.subjectid == "003" || script.subjectid == "008" || script.subjectid == "011"&lt;br/&gt;]&lt;br/&gt;/ file = "condition_1.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;// subject ids that should be administered condition #2&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "001" || script.subjectid == "004" || script.subjectid == "009" || script.subjectid == "012"&lt;br/&gt;]&lt;br/&gt;/ file = "condition_2.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;// subject ids that should be administered condition #3&lt;br/&gt;&amp;lt;include&amp;gt;&lt;br/&gt;/ precondition = [script.subjectid == "005" || script.subjectid == "006" || script.subjectid == "007" || script.subjectid == "010"&lt;br/&gt;]&lt;br/&gt;/ file = "condition_3.iqx"&lt;br/&gt;&amp;lt;/include&amp;gt;&lt;br/&gt;&lt;br/&gt;with "condition_1.iqx",  "condition_2.iqx" and  "condition_3.iqx" being the "actual" go-nogo scripts.&lt;br/&gt;&lt;br/&gt;Basic example attached. Double-click on main.iqx and enter a subject id between 001 and 012 -- the appropriate condition script will be administered. This would work the same way on the web -- you register "main.iqx" as your active web script, upload the to-be-included "actual" scripts, and configure your launch page to have participants enter their pre-assigned ID.&lt;br/&gt;</description><pubDate>Thu, 08 Sep 2016 08:47:11 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Integrating a pre-defined randomization list in script</title><link>https://forums.millisecond.com/Topic19666.aspx</link><description>Hi Dave&lt;br/&gt;Thanks so much for your answer! However, I should have also mentioned that we're conducting a double-blind randomized study so&amp;nbsp;the problem is that&amp;nbsp;I would see which condition was assigned to which participant. It's important that I who will be interacting with the participants (including starting the Experiment) may not see which condition was assigned to which participant. So what we would like to have would be a list that we could integrate in the script but&amp;nbsp;that an independent blinder could then&amp;nbsp;alter&amp;nbsp;(e.g. participant 001 = condition 3, participant 065 = condition 1 etc.)&amp;nbsp;without us seeing it. That way, the participant would just enter his/her number and be refered to the assigned condition. Since our participants are in-patients, some of them with few cognitive resources nor email access, it is unfortunately not possible for the blinder to directly send a link to participants. &lt;br/&gt;&lt;br/&gt;I would be very grateful if you knew another way of handling this. &lt;br/&gt;&lt;br/&gt;Thanks again for your support! &lt;br/&gt;</description><pubDate>Thu, 08 Sep 2016 01:25:12 GMT</pubDate><dc:creator>thestruggleisreal</dc:creator></item><item><title>RE: Integrating a pre-defined randomization list in script</title><link>https://forums.millisecond.com/Topic19663.aspx</link><description>You should set up a &amp;lt;batch&amp;gt; script like so.&lt;br/&gt;&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (1 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "a.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (2 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "b.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (3 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "c.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;where a, b and c.iqx are your three versions / conditions of the go-nogo. Call the file containing the 3 &amp;lt;batch&amp;gt; elements "batch.iqx" and register it as your active web script (you upload then "actual" scripts a to c in the next step along with any other files those scripts need).&lt;br/&gt;&lt;br/&gt;Configure your web experiment to read both the subject id AND the group id from URL query parameters. You can then ensure that a given subject receives the proper, pre-assigned condition by simply giving them an individualized link:&lt;br/&gt;&lt;br/&gt;&lt;a href="https://research.millisecond.com/yourusername/batch.web?subjectid=1&amp;amp;groupid=3"&gt;https://research.millisecond.com/yourusername/batch.web?subjectid=1&amp;amp;groupid=3&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;and so forth.&lt;br/&gt;</description><pubDate>Wed, 07 Sep 2016 08:05:37 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>