Millisecond Forums

ensuring an even and random distribution

https://forums.millisecond.com/Topic16572.aspx

By mlleng13 - 6/23/2015

Hello,

My current experiment is being programmed to be used on the Millisecond server. I have 6 potential conditions into which a participant may be placed. I have 6 experiments all of which are set up using "/subjects = (integer of 6)". My experiment requires screening questions. If the participants do meet them the experiment is terminated.

These questions are included in the same script as the rest of my experiment, therefore the subject ID is determined before it is determined whether or not a given participant is even eligible for the experiment.

 I am concerned , even though subject ID numbers are being generated randomly, that I will not end up with an even distribution of participants in my conditions (so far my pilot data ended up with only 1 of 20 subjects in one of my conditions). I just want to make sure that there is not a better way to be assigning the conditions that will ensure a more even distribution.
By Dave - 6/23/2015

Alternative options would be

(1) Determine IDs beforehand and passing them to the launch page via a query parameter (you'd essentially give participants individualized links).
(2) Conduct your screening questions via some web survey platform and use the platform's quota features to achieve equal distributions across conditions. The respective IDs would also be passed via query parameters.
(3) Check your data regularly during the data collection phase and take conditions that are "full" down, leaving only those with too few participants.

By mlleng13 - 6/23/2015

Hello Dave,

I am slightly confused by your first proposed solution. Essentially, my problem stems from the fact that I would prefer "to assign a subject ID after the screening", to put it simply, even though I know this is illogical. The only reason I need to do this, however, is because (as far as I am currently aware) the only way to randomize assignment is by using the subject ID. In other words, I do not know of a way to randomly assign participants to conditions without using a subject ID BUT the subject ID is determined before I would like it to be because some participants are deemed ineligible for the study even though, in the grand scheme of randomness they have technically "balanced" the distribution of the assignments. It is not the ID it self that I am wishing to change per se, rather the assignment function that seems to be inherently tied to the ID. 

I am very sorry if this is confusing (because I am pretty sure it is). If anything is unclear I will try to clarify.

By Dave - 6/23/2015

Subject number is *not* the only way to assign conditions. There is also group number. Let's say, for the sake of example, you have 4 conditions and have recruited 80 participants. You'd set up your script like this

<expt>
/ onexptbegin = [values.mycondition=1]
/ subjects = (1 of 4)
/ groupassignment = groupnumber

/ blocks = [1=myblock]
</expt>

<expt>
/ onexptbegin = [values.mycondition=2]
/ subjects = (2 of 4)
/ groupassignment = groupnumber

/ blocks = [1=myblock]
</expt>

<expt>
/ onexptbegin = [values.mycondition=3]
/ subjects = (3 of 4)
/ groupassignment = groupnumber

/ blocks = [1=myblock]
</expt>

<expt>
/ onexptbegin = [values.mycondition=4]
/ subjects = (4 of 4)
/ groupassignment = groupnumber

/ blocks = [1=myblock]
</expt>

<block myblock>
/ trials = [1=mytrial]
</block>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = ("This is condition #<%values.mycondition%>. Your subject id is <%script.subjectid%>. Press the spacebar.")
</text>

<values>
/ mycondition = 0
</values>

and pass the condition (i.e. group number) to the launch page via a query parameter. I.e., you'd give 20 random participants the following link

http://research.millisecond.com/david.nitz/conditionassignment.web?condition=1

another 20 the following

http://research.millisecond.com/david.nitz/conditionassignment.web?condition=2

yet another 20 the following

http://research.millisecond.com/david.nitz/conditionassignment.web?condition=3

and the final 20

http://research.millisecond.com/david.nitz/conditionassignment.web?condition=4

The idea here is two-fold: (1) It's unlikely that most ineligible participants fall into one particular condition. (2) Since you control which link you give out, you can fill up conditions as needed. I.e., in case you "lost" 5 participants in condition 3 due to ineligibility, you can simply give the link

http://research.millisecond.com/david.nitz/conditionassignment.web?condition=3

to a few more people.

Beyond that it is *not* possible to have Inquisit determine subject or group ids after the procedure has already started. Inquisit needs those to work from the start. The only other option would be to determine eligibility outside of Inquisit as mentioned in the previous response.

Hope this clarifies.