Assigning group number using subject ID


Author
Message
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
cast0095 - Thursday, May 11, 2017
Dave - Thursday, May 11, 2017
cast0095 - Thursday, May 11, 2017
Thanks Dave,

I should have said that I had tried that method, however due to the limitations you mentioned here https://www.millisecond.com/forums/Topic8594.aspx#bm8598 with the include element being overwhelmed (I think in this case by too many expressions in the /precondition attribute, i.e. around 60 script.subjectid == "xxxx" expressions).

Please disregard my last post as I've now worked around these limitations by splitting the number of /precondition expressions into another include element i.e:

<include>
/ precondition = [script.subjectid == "xxxx".... 30 of these elements ]
/ file = "batch_taskorder1.iqx"
</include>

<include>
/ precondition = [script.subjectid == "1752"... the other 30 elements]
/ file = "batch_taskorder1.iqx"
</include>

<include>
/ precondition = [script.subjectid == "xxxx".... 30 of these elements ]
/ file = "batch_taskorder2.iqx"
</include>

<include>
/ precondition = [script.subjectid == "1752"... the other 30 elements]
/ file = "batch_taskorder2.iqx"
</include>

This is all working well now, however I've encountered another problem: the <batch> scripts that are referenced from the <include> elements (e.g. / file = "batch_taskorder1.iqx") are not executing.

When I run the above <include> script, it extracts elements from the appropriate <batch> script, however the <batch> script does not run.

When I reference an individual task script in the <include> element as you said in your last post (https://www.millisecond.com/forums/Topic19661.aspx#bm19667) it works, however due to the way I am counterbalancing I need it to reference a batch script.

Any thoughts on this? I've attached the <include> script (start_script_include) and the batch scripts for reference.

Thanks once again!


Sorry, you can't <include> <batch>-scripts. <batch> scripts work somewhat differently than regular / "actual" scripts -- they control the execution of regular scripts -- and hence run in a different "control thread" if you will. You basically can't start (another) such control thread once you're in the "regular" script execution thread, which is where "start_script_include.iqx" is executed.

I know this is frustrating.

Going back to your 2nd post ( https://www.millisecond.com/forums/FindPost21536.aspx ), your concern was that you couldn't use the groupnumber for <batch> condition assignment because one of the scripts run by the <batch> elements also relies on the groupnumber to counterbalance block order. It is not strictly true that this precludes using groupnumber in <batch>es. You can put

// order 1
<batch>
/ subjects = (1,2,3,4 of 8)
/ groupassignment = groupnumber
/ file = "a.iqx"
/ file = "b.iqx"
/ file = "c.iqx"
</batch>

// order 2
<batch>
/ subjects = (5,6,7,8 of 8)
/ groupassignment = groupnumber
/ file = "b.iqx"
/ file = "c.iqx"
/ file = "a.iqx"
</batch>

in a single batch script file. This will ensure that the scripts run by the respective batches *also* get varying groupnumbers and hence can counterbalance blocks and the like based on the groupnumber. More on how condition assignment works mathematically is here: https://www.millisecond.com/forums/Topic13856.aspx

Would that approach help / solve the problem?


Ok that's a shame - I thought I nearly had it there!

I'm not sure that solution would work - I've attached my counterbalancing sheet with the issues I will have if I try to counterbalance one of my tasks (Task2) with a sequential groupnumber - effectively I've got 8 different conditions (looking at the combinations of Task_order and Task2_version in the sheet) with 6 participants in each condition.

I could write 8 different batch files 

// Task_order_1 Task2_Version1
<batch>
/ subjects = (1,2,3,4,5,6 of 48)
/ groupassignment = groupnumber
/ file = "Task1.iqx"
/ file = "Task2_version1.iqx"
/ file = "Task3.iqx"
</batch>

// Task_order_2 Task2_Version1
<batch>
/ subjects = (7,8,9,10,11,12 of 48)
/ groupassignment = groupnumber
/ file = "Task1.iqx"
/ file = "Task3.iqx"
/ file = "Task2_version1.iqx"
</batch>

// Task_order_1 Task2_Version2
<batch>
/ subjects = (13,14,15,16,17,18 of 48)
/ groupassignment = groupnumber
/ file = "Task1.iqx"
/ file = "Task2_version2.iqx"
/ file = "Task3.iqx"
</batch>

etc... but then I'd be worried that if for some reason one administration of the web experiment didn't work/crashed and had to be done again, the subsequent groupnumber (i.e. the groupnumber on readministration of the task) would  not match up with the appropriate counterbalancing groupnumber (as it would be  correct groupnumber +1) - is this correct?

As a result I've decided to go for the manual option and pass the appropriate groupnumber for Task2 (read from the counterbalancing sheet) through the URL parameter on the web script.

Thanks for all of your help. 

> I'd be worried that if for some reason one administration of the web experiment didn't work/crashed and had to be done again, the subsequent groupnumber (i.e. the
> groupnumber on readministration of the task) would  not match up with the appropriate counterbalancing groupnumber (as it would be  correct groupnumber +1) - is this
> correct?

Yes, under some circumstances this could occur (it would depend on *how* things went wrong in a given instance). To eliminate that risk, I absolutely agree that explicitly specifying the groupnumber via a URL query parameter is the best / closest to fail-safe option.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search