Millisecond Forums

Batch/Include or other merging possibilities

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

By avan - 9/17/2018

Hello!

I have a series of scripts that I would like to run as a single experiment. However, I want to run the experiment online and I want to randomize the order of the scripts (with some constraints). I've looked through the documentation, and it stated that there was no way to easily randomize batch order, although that was as of version 3 and that updates were slated. I cannot find more recent documentation that states whether this capability is present in version 5. Does anybody know if this is now a capability? Alternately, I don't mind fiddling with the code, but I am new to inquisit and my attempts to batch single files based on conditionals or draw file names from variables or lists, which is what I would do if I were using other languages, is not working. I'm not sure if it's a limitation of Inquisit or simply because I am new to this particular system and haven't figured it out yet. 
I am not sure if "include" would work for me here, as I have very different types of scripts that I am trying to run together, and so the default parameters and data requirement output are different across my scripts, so setting a single structure across all scripts does not seem like it would work. 
If anybody has any guidance for how I could randomize the order of batch scripts (in a way that I could use online), I would appreciate it. 

Thanks!
Amanda
By Dave - 9/17/2018

avan - Monday, September 17, 2018
Hello!

I have a series of scripts that I would like to run as a single experiment. However, I want to run the experiment online and I want to randomize the order of the scripts (with some constraints). I've looked through the documentation, and it stated that there was no way to easily randomize batch order, although that was as of version 3 and that updates were slated. I cannot find more recent documentation that states whether this capability is present in version 5. Does anybody know if this is now a capability? Alternately, I don't mind fiddling with the code, but I am new to inquisit and my attempts to batch single files based on conditionals or draw file names from variables or lists, which is what I would do if I were using other languages, is not working. I'm not sure if it's a limitation of Inquisit or simply because I am new to this particular system and haven't figured it out yet. 
I am not sure if "include" would work for me here, as I have very different types of scripts that I am trying to run together, and so the default parameters and data requirement output are different across my scripts, so setting a single structure across all scripts does not seem like it would work. 
If anybody has any guidance for how I could randomize the order of batch scripts (in a way that I could use online), I would appreciate it. 

Thanks!
Amanda

The way to do this is to define several <batch> conditions, one for each order you need to administer. So, suppose you have three scripts A, B and C, and wish to administer every order possible (there are six in this case), randomly assigning each participant to one of those orders. Then you do something like:

// order A -> B -> C
<batch>
/ subjects = (1 of 6)
/ groupassignment = random
/ file = "a.iqx"
/ file = "b.iqx"
/ file = "c.iqx"
</batch>

// order A -> C -> B
<batch>
/ subjects = (2 of 6)
/ groupassignment = random
/ file = "a.iqx"
/ file = "c.iqx"
/ file = "b.iqx"
</batch>

// order B -> A -> C
<batch>
/ subjects = (3 of 6)
/ groupassignment = random
/ file = "b.iqx"
/ file = "a.iqx"
/ file = "c.iqx"
</batch>

// order B -> C -> A
<batch>
/ subjects = (4 of 6)
/ groupassignment = random
/ file = "b.iqx"
/ file = "c.iqx"
/ file = "a.iqx"
</batch>

// order C -> A -> B
<batch>
/ subjects = (5 of 6)
/ groupassignment = random
/ file = "c.iqx"
/ file = "a.iqx"
/ file = "b.iqx"
</batch>

// order C -> B -> A
<batch>
/ subjects = (6 of 6)
/ groupassignment = random
/ file = "c.iqx"
/ file = "b.iqx"
/ file = "a.iqx"
</batch>

You can also set /groupassignment to either groupnumber or subjectnumber in the above to have the assignment done based on (randomly generated) numerical subject or group numbers.


By avan - 9/17/2018

Dave - Monday, September 17, 2018
avan - Monday, September 17, 2018
Hello!

I have a series of scripts that I would like to run as a single experiment. However, I want to run the experiment online and I want to randomize the order of the scripts (with some constraints). I've looked through the documentation, and it stated that there was no way to easily randomize batch order, although that was as of version 3 and that updates were slated. I cannot find more recent documentation that states whether this capability is present in version 5. Does anybody know if this is now a capability? Alternately, I don't mind fiddling with the code, but I am new to inquisit and my attempts to batch single files based on conditionals or draw file names from variables or lists, which is what I would do if I were using other languages, is not working. I'm not sure if it's a limitation of Inquisit or simply because I am new to this particular system and haven't figured it out yet. 
I am not sure if "include" would work for me here, as I have very different types of scripts that I am trying to run together, and so the default parameters and data requirement output are different across my scripts, so setting a single structure across all scripts does not seem like it would work. 
If anybody has any guidance for how I could randomize the order of batch scripts (in a way that I could use online), I would appreciate it. 

Thanks!
Amanda

The way to do this is to define several <batch> conditions, one for each order you need to administer. So, suppose you have three scripts A, B and C, and wish to administer every order possible (there are six in this case), randomly assigning each participant to one of those orders. Then you do something like:

// order A -> B -> C
<batch>
/ subjects = (1 of 6)
/ groupassignment = random
/ file = "a.iqx"
/ file = "b.iqx"
/ file = "c.iqx"
</batch>

// order A -> C -> B
<batch>
/ subjects = (2 of 6)
/ groupassignment = random
/ file = "a.iqx"
/ file = "c.iqx"
/ file = "b.iqx"
</batch>

// order B -> A -> C
<batch>
/ subjects = (3 of 6)
/ groupassignment = random
/ file = "b.iqx"
/ file = "a.iqx"
/ file = "c.iqx"
</batch>

// order B -> C -> A
<batch>
/ subjects = (4 of 6)
/ groupassignment = random
/ file = "b.iqx"
/ file = "c.iqx"
/ file = "a.iqx"
</batch>

// order C -> A -> B
<batch>
/ subjects = (5 of 6)
/ groupassignment = random
/ file = "c.iqx"
/ file = "a.iqx"
/ file = "b.iqx"
</batch>

// order C -> B -> A
<batch>
/ subjects = (6 of 6)
/ groupassignment = random
/ file = "c.iqx"
/ file = "b.iqx"
/ file = "a.iqx"
</batch>

You can also set /groupassignment to either groupnumber or subjectnumber in the above to have the assignment done based on (randomly generated) numerical subject or group numbers.



Ok, thank you. I started to do this, but my issue is that I have 9 scripts, split into 3 different "types" of tasks with 3 scripts of each type. I want to run three 'blocks' and within each block, have one script of each type (the particular task from each type randomly determined), and then have the order within each block shuffled as well. This leaves too many possible combinations for me to hard-write them all in this way. Unless there is a way for me to use variable names (e.g., set a file name to a variable name, randomly shuffle, then batch the variable name rather than hard-code a file name. I tried this and it didn't seem to work) or some other method that is more flexible than the batch, I will likely have to counterbalance a small number of possible orders, rather than randomizing the order, and batch like this.

Thanks for your quick response!