﻿<?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 6  » Question about randomisation</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Mon, 21 Sep 2026 14:07:35 GMT</lastBuildDate><ttl>20</ttl><item><title>Question about randomisation</title><link>https://forums.millisecond.com/Topic35003.aspx</link><description>I am struggling with implementing randomization in my experiment.&amp;nbsp;&lt;br/&gt;The layout of the study is the following:&amp;nbsp;&lt;br/&gt;My participants must be randomly assigned to start with one sequence of trials. After that, they still have to complete the sequence that hasn't been chosen to ensure counterbalancing in the long run.&amp;nbsp;&lt;br/&gt;Currently, my script looks like this for the randomization: &lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = &lt;br/&gt;if(values.selector == 0){&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return [1 = Practice_EmotionalStroop; 2 = EmotionalStroopEnglish; 3 = EmotionalStroopGerman; 4 = finish;]&lt;br/&gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br/&gt;else{&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return [1 = Practice_EmotionalStroop;2 = EmotionalStroopGerman;3 = EmotionalStroopEnglish; 4 = finish;]&lt;br/&gt;}&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;I also changed something in the value section to ensure the randomization of the selector: &lt;br/&gt;&lt;br/&gt;/selector = round(rand(0, 1))&lt;br/&gt;&lt;br/&gt;At the moment my experiment always starts in English.&lt;br/&gt;&lt;br/&gt;In general, all participants have to go through the practice trial first, then they should be randomly allocated to start the experiment in English or German first. Afterward, they still have to go through the trial/block that they haven't been allocated to in the first place. &lt;br/&gt;I have no experience in programming and I chose an already-written script from the millisecond library and changed it to my needs. Except for this part, all is working fine.&lt;br/&gt;&lt;br/&gt;Thanks for any help!&amp;nbsp;</description><pubDate>Mon, 05 Dec 2022 16:28:00 GMT</pubDate><dc:creator>Hanna_Wolf2022</dc:creator></item><item><title>RE: Question about randomisation</title><link>https://forums.millisecond.com/Topic35010.aspx</link><description>&lt;blockquote data-id="35009" class="if-quote-wrapper" unselectable="on" data-guid="1670257696971" contenteditable="false" id="if_insertedNode_1670257696496"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="35009" 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="35009" 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="35009" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 12/5/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-35009"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="35008" class="if-quote-wrapper" unselectable="on" data-guid="1670257696971" id="if_insertedNode_1670257569545" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="35008" 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="35008" 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="35008" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Hanna_Wolf2022 - 12/5/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-35008"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="35005" class="if-quote-wrapper" unselectable="on" data-guid="1670257696971" id="if_insertedNode_1670257371005" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="35005" 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="35005" 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="35005" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 12/5/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-35005"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="35003" class="if-quote-wrapper" unselectable="on" data-guid="1670257696971" id="if_insertedNode_1670243417357" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="35003" 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="35003" 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="35003" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Hanna_Wolf2022 - 12/4/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-35003"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;I am struggling with implementing randomization in my experiment.&amp;nbsp;&lt;br/&gt;The layout of the study is the following:&amp;nbsp;&lt;br/&gt;My participants must be randomly assigned to start with one sequence of trials. After that, they still have to complete the sequence that hasn't been chosen to ensure counterbalancing in the long run.&amp;nbsp;&lt;br/&gt;Currently, my script looks like this for the randomization: &lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = &lt;br/&gt;if(values.selector == 0){&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return [1 = Practice_EmotionalStroop; 2 = EmotionalStroopEnglish; 3 = EmotionalStroopGerman; 4 = finish;]&lt;br/&gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br/&gt;else{&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return [1 = Practice_EmotionalStroop;2 = EmotionalStroopGerman;3 = EmotionalStroopEnglish; 4 = finish;]&lt;br/&gt;}&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;I also changed something in the value section to ensure the randomization of the selector: &lt;br/&gt;&lt;br/&gt;/selector = round(rand(0, 1))&lt;br/&gt;&lt;br/&gt;At the moment my experiment always starts in English.&lt;br/&gt;&lt;br/&gt;In general, all participants have to go through the practice trial first, then they should be randomly allocated to start the experiment in English or German first. Afterward, they still have to go through the trial/block that they haven't been allocated to in the first place. &lt;br/&gt;I have no experience in programming and I chose an already-written script from the millisecond library and changed it to my needs. Except for this part, all is working fine.&lt;br/&gt;&lt;br/&gt;Thanks for any help!&amp;nbsp;&lt;a class="if-quote-goto quote-link" href="#" data-id="35003"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;The blocks attribute doesn't work like that, you can't do if-else expressions in it.&lt;br/&gt;&lt;br/&gt;What you need to do is simply set up two conditions, i.e. two &amp;lt;expts&amp;gt;. Then assign participants randomly to one.&lt;br/&gt;&lt;br/&gt;[code]// english first&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1 = Practice_EmotionalStroop; 2 = EmotionalStroopEnglish; 3 = EmotionalStroopGerman; 4 = finish;]&lt;br/&gt;/ groups = (1 of 2)&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;// german first&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1 = Practice_EmotionalStroop; 2 = EmotionalStroopGerman; 3 = EmotionalStroopEnglish; 4 = finish;]&lt;br/&gt;/ groups = (2 of 2)&lt;br/&gt;&amp;lt;/expt&amp;gt;[/code]&lt;a class="if-quote-goto quote-link" href="#" data-id="35005"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;Thanks for the reply! &lt;br/&gt;My experiment will be completely online and there will be a questionnaire first which leads to the reaction task afterward. I do not manually assign participants myself. Can I tell the script to assign the participants randomly itself?&lt;a class="if-quote-goto quote-link" href="#" data-id="35008"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;You can configure that in the web experiment's settings when you upload your files. You'll want to select random group ID generation and indicate the number of groups as 2.&lt;a class="if-quote-goto quote-link" href="#" data-id="35009"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;Thank you!!</description><pubDate>Mon, 05 Dec 2022 16:28:00 GMT</pubDate><dc:creator>Hanna_Wolf2022</dc:creator></item><item><title>RE: Question about randomisation</title><link>https://forums.millisecond.com/Topic35009.aspx</link><description>&lt;blockquote data-id="35008" class="if-quote-wrapper" unselectable="on" data-guid="1670257570305" id="if_insertedNode_1670257569545" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="35008" 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="35008" 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="35008" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Hanna_Wolf2022 - 12/5/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-35008"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="35005" class="if-quote-wrapper" unselectable="on" data-guid="1670257570305" id="if_insertedNode_1670257371005" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="35005" 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="35005" 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="35005" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 12/5/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-35005"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="35003" class="if-quote-wrapper" unselectable="on" data-guid="1670257570305" id="if_insertedNode_1670243417357" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="35003" 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="35003" 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="35003" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Hanna_Wolf2022 - 12/4/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-35003"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;I am struggling with implementing randomization in my experiment.&amp;nbsp;&lt;br/&gt;The layout of the study is the following:&amp;nbsp;&lt;br/&gt;My participants must be randomly assigned to start with one sequence of trials. After that, they still have to complete the sequence that hasn't been chosen to ensure counterbalancing in the long run.&amp;nbsp;&lt;br/&gt;Currently, my script looks like this for the randomization: &lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = &lt;br/&gt;if(values.selector == 0){&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return [1 = Practice_EmotionalStroop; 2 = EmotionalStroopEnglish; 3 = EmotionalStroopGerman; 4 = finish;]&lt;br/&gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br/&gt;else{&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return [1 = Practice_EmotionalStroop;2 = EmotionalStroopGerman;3 = EmotionalStroopEnglish; 4 = finish;]&lt;br/&gt;}&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;I also changed something in the value section to ensure the randomization of the selector: &lt;br/&gt;&lt;br/&gt;/selector = round(rand(0, 1))&lt;br/&gt;&lt;br/&gt;At the moment my experiment always starts in English.&lt;br/&gt;&lt;br/&gt;In general, all participants have to go through the practice trial first, then they should be randomly allocated to start the experiment in English or German first. Afterward, they still have to go through the trial/block that they haven't been allocated to in the first place. &lt;br/&gt;I have no experience in programming and I chose an already-written script from the millisecond library and changed it to my needs. Except for this part, all is working fine.&lt;br/&gt;&lt;br/&gt;Thanks for any help!&amp;nbsp;&lt;a class="if-quote-goto quote-link" href="#" data-id="35003"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;The blocks attribute doesn't work like that, you can't do if-else expressions in it.&lt;br/&gt;&lt;br/&gt;What you need to do is simply set up two conditions, i.e. two &amp;lt;expts&amp;gt;. Then assign participants randomly to one.&lt;br/&gt;&lt;br/&gt;[code]// english first&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1 = Practice_EmotionalStroop; 2 = EmotionalStroopEnglish; 3 = EmotionalStroopGerman; 4 = finish;]&lt;br/&gt;/ groups = (1 of 2)&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;// german first&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1 = Practice_EmotionalStroop; 2 = EmotionalStroopGerman; 3 = EmotionalStroopEnglish; 4 = finish;]&lt;br/&gt;/ groups = (2 of 2)&lt;br/&gt;&amp;lt;/expt&amp;gt;[/code]&lt;a class="if-quote-goto quote-link" href="#" data-id="35005"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;Thanks for the reply! &lt;br/&gt;My experiment will be completely online and there will be a questionnaire first which leads to the reaction task afterward. I do not manually assign participants myself. Can I tell the script to assign the participants randomly itself?&lt;a class="if-quote-goto quote-link" href="#" data-id="35008"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;You can configure that in the web experiment's settings when you upload your files. You'll want to select random group ID generation and indicate the number of groups as 2.</description><pubDate>Mon, 05 Dec 2022 16:27:01 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: Question about randomisation</title><link>https://forums.millisecond.com/Topic35008.aspx</link><description>&lt;blockquote data-id="35005" class="if-quote-wrapper" unselectable="on" data-guid="1670257371502" contenteditable="false" id="if_insertedNode_1670257371005"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="35005" 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="35005" 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="35005" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - 12/5/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-35005"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;&lt;blockquote data-id="35003" class="if-quote-wrapper" unselectable="on" data-guid="1670257371502" id="if_insertedNode_1670243417357" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="35003" 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="35003" 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="35003" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Hanna_Wolf2022 - 12/4/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-35003"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;I am struggling with implementing randomization in my experiment.&amp;nbsp;&lt;br/&gt;The layout of the study is the following:&amp;nbsp;&lt;br/&gt;My participants must be randomly assigned to start with one sequence of trials. After that, they still have to complete the sequence that hasn't been chosen to ensure counterbalancing in the long run.&amp;nbsp;&lt;br/&gt;Currently, my script looks like this for the randomization: &lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = &lt;br/&gt;if(values.selector == 0){&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return [1 = Practice_EmotionalStroop; 2 = EmotionalStroopEnglish; 3 = EmotionalStroopGerman; 4 = finish;]&lt;br/&gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br/&gt;else{&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return [1 = Practice_EmotionalStroop;2 = EmotionalStroopGerman;3 = EmotionalStroopEnglish; 4 = finish;]&lt;br/&gt;}&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;I also changed something in the value section to ensure the randomization of the selector: &lt;br/&gt;&lt;br/&gt;/selector = round(rand(0, 1))&lt;br/&gt;&lt;br/&gt;At the moment my experiment always starts in English.&lt;br/&gt;&lt;br/&gt;In general, all participants have to go through the practice trial first, then they should be randomly allocated to start the experiment in English or German first. Afterward, they still have to go through the trial/block that they haven't been allocated to in the first place. &lt;br/&gt;I have no experience in programming and I chose an already-written script from the millisecond library and changed it to my needs. Except for this part, all is working fine.&lt;br/&gt;&lt;br/&gt;Thanks for any help!&amp;nbsp;&lt;a class="if-quote-goto quote-link" href="#" data-id="35003"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;The blocks attribute doesn't work like that, you can't do if-else expressions in it.&lt;br/&gt;&lt;br/&gt;What you need to do is simply set up two conditions, i.e. two &amp;lt;expts&amp;gt;. Then assign participants randomly to one.&lt;br/&gt;&lt;br/&gt;[code]// english first&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1 = Practice_EmotionalStroop; 2 = EmotionalStroopEnglish; 3 = EmotionalStroopGerman; 4 = finish;]&lt;br/&gt;/ groups = (1 of 2)&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;// german first&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1 = Practice_EmotionalStroop; 2 = EmotionalStroopGerman; 3 = EmotionalStroopEnglish; 4 = finish;]&lt;br/&gt;/ groups = (2 of 2)&lt;br/&gt;&amp;lt;/expt&amp;gt;[/code]&lt;a class="if-quote-goto quote-link" href="#" data-id="35005"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;Thanks for the reply! &lt;br/&gt;My experiment will be completely online and there will be a questionnaire first which leads to the reaction task afterward. I do not manually assign participants myself. Can I tell the script to assign the participants randomly itself?</description><pubDate>Mon, 05 Dec 2022 16:24:09 GMT</pubDate><dc:creator>Hanna_Wolf2022</dc:creator></item><item><title>RE: Question about randomisation</title><link>https://forums.millisecond.com/Topic35005.aspx</link><description>&lt;blockquote data-id="35003" class="if-quote-wrapper" unselectable="on" data-guid="1670243418978" id="if_insertedNode_1670243417357" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="35003" 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="35003" 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="35003" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Hanna_Wolf2022 - 12/4/2022&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-35003"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;I am struggling with implementing randomization in my experiment.&amp;nbsp;&lt;br/&gt;The layout of the study is the following:&amp;nbsp;&lt;br/&gt;My participants must be randomly assigned to start with one sequence of trials. After that, they still have to complete the sequence that hasn't been chosen to ensure counterbalancing in the long run.&amp;nbsp;&lt;br/&gt;Currently, my script looks like this for the randomization: &lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = &lt;br/&gt;if(values.selector == 0){&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return [1 = Practice_EmotionalStroop; 2 = EmotionalStroopEnglish; 3 = EmotionalStroopGerman; 4 = finish;]&lt;br/&gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br/&gt;else{&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return [1 = Practice_EmotionalStroop;2 = EmotionalStroopGerman;3 = EmotionalStroopEnglish; 4 = finish;]&lt;br/&gt;}&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;I also changed something in the value section to ensure the randomization of the selector: &lt;br/&gt;&lt;br/&gt;/selector = round(rand(0, 1))&lt;br/&gt;&lt;br/&gt;At the moment my experiment always starts in English.&lt;br/&gt;&lt;br/&gt;In general, all participants have to go through the practice trial first, then they should be randomly allocated to start the experiment in English or German first. Afterward, they still have to go through the trial/block that they haven't been allocated to in the first place. &lt;br/&gt;I have no experience in programming and I chose an already-written script from the millisecond library and changed it to my needs. Except for this part, all is working fine.&lt;br/&gt;&lt;br/&gt;Thanks for any help!&amp;nbsp;&lt;a class="if-quote-goto quote-link" href="#" data-id="35003"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;The blocks attribute doesn't work like that, you can't do if-else expressions in it.&lt;br/&gt;&lt;br/&gt;What you need to do is simply set up two conditions, i.e. two &amp;lt;expts&amp;gt;. Then assign participants randomly to one.&lt;br/&gt;&lt;br/&gt;[code]// english first&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1 = Practice_EmotionalStroop; 2 = EmotionalStroopEnglish; 3 = EmotionalStroopGerman; 4 = finish;]&lt;br/&gt;/ groups = (1 of 2)&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;// german first&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1 = Practice_EmotionalStroop; 2 = EmotionalStroopGerman; 3 = EmotionalStroopEnglish; 4 = finish;]&lt;br/&gt;/ groups = (2 of 2)&lt;br/&gt;&amp;lt;/expt&amp;gt;[/code]</description><pubDate>Mon, 05 Dec 2022 12:33:38 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>