Millisecond Forums

group assignment

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

By EmmaB - 11/25/2017

Hi,

I want to run one study (one inquisit script file) which holds 16 different counterbalance versions (experiments). I want to assign each participant to a predefined version (1 - 16, not random).
I thought this should be easy given the group number entry option right at the start when launching the experiment. Moreover, in the <expt> there is also a /groupassignment option, so I thought i just write
/groupassigment = 4  if i want this experiment to be run when i enter 4 as group number right at the start.

But this does not work.

How can I still achieve my goal to run 1 of 16 experiments upon entering a specific (1-16) group number at the beginning?

Thanks in advance


By Dave - 11/27/2017

EmmaB - Sunday, November 26, 2017
Hi,

I want to run one study (one inquisit script file) which holds 16 different counterbalance versions (experiments). I want to assign each participant to a predefined version (1 - 16, not random).
I thought this should be easy given the group number entry option right at the start when launching the experiment. Moreover, in the <expt> there is also a /groupassignment option, so I thought i just write
/groupassigment = 4  if i want this experiment to be run when i enter 4 as group number right at the start.

But this does not work.

How can I still achieve my goal to run 1 of 16 experiments upon entering a specific (1-16) group number at the beginning?

Thanks in advance



You need to use both the /subjects attribute as well as the /groupassignment attribute _together_ (they always work together). /subjects specifies the number of conditions and which condition is which (1 of 16, 2 of 16, etc.). /groupassignment specifies _how_ people are assigned to those conditions (per their numerical subject id, per their group number, or randomly -- i.e. no relation to either subject or group number). In short you do

// condition 1
<expt>
/ subjects = (1 of 16)
/ groupassignment = groupnumber
...
</expt>

[...]

// condition 16
<expt>
/ subjects = (16 of 16)
/ groupassignment = groupnumber
...
</expt>
By EmmaB - 11/27/2017

Dave - Monday, November 27, 2017
EmmaB - Sunday, November 26, 2017
Hi,

I want to run one study (one inquisit script file) which holds 16 different counterbalance versions (experiments). I want to assign each participant to a predefined version (1 - 16, not random).
I thought this should be easy given the group number entry option right at the start when launching the experiment. Moreover, in the <expt> there is also a /groupassignment option, so I thought i just write
/groupassigment = 4  if i want this experiment to be run when i enter 4 as group number right at the start.

But this does not work.

How can I still achieve my goal to run 1 of 16 experiments upon entering a specific (1-16) group number at the beginning?

Thanks in advance



You need to use both the /subjects attribute as well as the /groupassignment attribute _together_ (they always work together). /subjects specifies the number of conditions and which condition is which (1 of 16, 2 of 16, etc.). /groupassignment specifies _how_ people are assigned to those conditions (per their numerical subject id, per their group number, or randomly -- i.e. no relation to either subject or group number). In short you do

// condition 1
<expt>
/ subjects = (1 of 16)
/ groupassignment = groupnumber
...
</expt>

[...]

// condition 16
<expt>
/ subjects = (16 of 16)
/ groupassignment = groupnumber
...
</expt>

thanks! After hours of trying I did figure it out myself...I knew it cannot be that difficult. Just confusing that you define groups with the /subjects command line  :)

But this is super clear!
By n.lee.20 - 10/22/2021

Hi

I am running a 12 session longitudinal study using Inquisit web. I have manually counterbalanced the 36 options for each of the first 10 sessions, so have 360 .iqx scripts (session 11 and 12 are the same for all participants. I have tried to use the sessions and group attributes to manually assign participants so that someone assigned to group 1 will view the group 1 scripts across the sessions. Currently whilst testing it in Inquisit lab I am having issues with getting the correct group and session allocation.

---------------------------------------------------------------------------------------------------------------------------------------------
Session 1
<batch>
/ subjects = (1 of 36)
/ groupassignment = groupnumber
/ sessions = (1 of 12)
/ file = "Session1_1.iqx"
</batch>

[...]

<batch>
/ subjects = (36 of 36)
/ groupassignment = groupnumber
/ sessions = (1 of 12)
/ file = "Session1_36.iqx"
</batch>

Session 2
<batch>
/ subjects = (1 of 36)
/ groupassignment = groupnumber
/ sessions = (2 of 12)
/ file = "Session2_1.iqx"
</batch>

[...]

<batch>
/ subjects = (36 of 36)
/ groupassignment = groupnumber
/ sessions = (2 of 12)
/ file = "Session2_36.iqx"
</batch>

etc

Session 11
<batch>
/ sessions = (11 of 12)
/ file = "Session11.iqx"
</batch>

Session 12
<batch>
/ sessions = (12 of 12)
/ file = "Session12.iqx"
</batch>

---------------------------------------------------------------------------------------------------------------------------------------------

When I run this in Inquisit lab with:
Subject id: 1, Group number: 1, Session number: 1 it runs all the session 1 scripts ("Session1_1.iqx" - "Session1_36.iqx") then the group 1 script for each of the following sessions up to Session 10 ("Session2_1.iqx",  "Session3_1.iqx", etc). Session 11 and 12 do not run.

Subject id 1, Group number: 2, Session number: 1 it runs group 2 for session 1 ("Session1_2.iqx") all the groups in session 2 ("Session2_1.iqx" - "Session2_36.iqx") then the group 2 script for each of the following session up to Session 10 ("Session3_2.iqx", "Session4_2.iqx", etc). Session 11 and 12 do not run.

The same pattern occurs with Group number 3 etc. When Group number 13 is used it is the same as Group number 1. When Subject id: 1, Group number: 1, Session number: 2 it's the same as Group number 1 (first example). 

I have also tried adapting the code:
<batch>
/ sessions = (1 of 12)
/ groups = (1 of 36)
/ file = "Session1_1.iqx"
</batch>

And the same issue occurs.

I would appreciate any help in how I can run a longitudinal study where subjects are allocated to the same group number each session and are allocated to subsequent sessions each time. When I remove the /session = x from the code and run each session separately the group allocation works and only the correct script is run. If I have to have separate links for each session is there a way that I can ensure the same participants is allocated to the same group number each time?

I have included a zip file in case that is helpful, but due to the need for manual counterbalance across each session it is very large. 

Many thanks in advance!




By Dave - 10/22/2021

n.lee.20 - 10/22/2021
Hi

I am running a 12 session longitudinal study using Inquisit web. I have manually counterbalanced the 36 options for each of the first 10 sessions, so have 360 .iqx scripts (session 11 and 12 are the same for all participants. I have tried to use the sessions and group attributes to manually assign participants so that someone assigned to group 1 will view the group 1 scripts across the sessions. Currently whilst testing it in Inquisit lab I am having issues with getting the correct group and session allocation.

---------------------------------------------------------------------------------------------------------------------------------------------
Session 1
<batch>
/ subjects = (1 of 36)
/ groupassignment = groupnumber
/ sessions = (1 of 12)
/ file = "Session1_1.iqx"
</batch>

[...]

<batch>
/ subjects = (36 of 36)
/ groupassignment = groupnumber
/ sessions = (1 of 12)
/ file = "Session1_36.iqx"
</batch>

Session 2
<batch>
/ subjects = (1 of 36)
/ groupassignment = groupnumber
/ sessions = (2 of 12)
/ file = "Session2_1.iqx"
</batch>

[...]

<batch>
/ subjects = (36 of 36)
/ groupassignment = groupnumber
/ sessions = (2 of 12)
/ file = "Session2_36.iqx"
</batch>

etc

Session 11
<batch>
/ sessions = (11 of 12)
/ file = "Session11.iqx"
</batch>

Session 12
<batch>
/ sessions = (12 of 12)
/ file = "Session12.iqx"
</batch>

---------------------------------------------------------------------------------------------------------------------------------------------

When I run this in Inquisit lab with:
Subject id: 1, Group number: 1, Session number: 1 it runs all the session 1 scripts ("Session1_1.iqx" - "Session1_36.iqx") then the group 1 script for each of the following sessions up to Session 10 ("Session2_1.iqx",  "Session3_1.iqx", etc). Session 11 and 12 do not run.

Subject id 1, Group number: 2, Session number: 1 it runs group 2 for session 1 ("Session1_2.iqx") all the groups in session 2 ("Session2_1.iqx" - "Session2_36.iqx") then the group 2 script for each of the following session up to Session 10 ("Session3_2.iqx", "Session4_2.iqx", etc). Session 11 and 12 do not run.

The same pattern occurs with Group number 3 etc. When Group number 13 is used it is the same as Group number 1. When Subject id: 1, Group number: 1, Session number: 2 it's the same as Group number 1 (first example). 

I have also tried adapting the code:
<batch>
/ sessions = (1 of 12)
/ groups = (1 of 36)
/ file = "Session1_1.iqx"
</batch>

And the same issue occurs.

I would appreciate any help in how I can run a longitudinal study where subjects are allocated to the same group number each session and are allocated to subsequent sessions each time. When I remove the /session = x from the code and run each session separately the group allocation works and only the correct script is run. If I have to have separate links for each session is there a way that I can ensure the same participants is allocated to the same group number each time?

I have included a zip file in case that is helpful, but due to the need for manual counterbalance across each session it is very large. 

Many thanks in advance!





The way /subjects, /groups and /sessions attributes currently work is that a condition will be run if *any* of them applies if multiple are defined in a batch element.

The way to do this then is to nest several batch scripts. For the sake of example, suppose you have 3 sessions and 4 groups. Then you'd have a session batch script

// session assignment
<batch>
/ sessions = (1 of 3)
/ file = "session1_batch.iqx"
</batch>

<batch>
/ sessions = (2 of 3)
/ file = "session2_batch.iqx"
</batch>

<batch>
/ sessions = (3 of 3)
/ file = "session3_batch.iqx"
</batch>


and 3 sub-batch scripts performing the within-session group assignment:

// session1_batch.iqx
<batch>
/ groups = (1 of 4)
/ file = "session1_1.iqx"
</batch>

<batch>
/ groups = (2 of 4)
/ file = "session1_2.iqx"
</batch>

<batch>
/ groups = (3 of 4)
/ file = "session1_3.iqx"
</batch>

<batch>
/ groups = (4 of 4)
/ file = "session1_4.iqx"
</batch>


// session2_batch.iqx
<batch>
/ groups = (1 of 4)
/ file = "session2_1.iqx"
</batch>

<batch>
/ groups = (2 of 4)
/ file = "session2_2.iqx"
</batch>

<batch>
/ groups = (3 of 4)
/ file = "session2_3.iqx"
</batch>

<batch>
/ groups = (4 of 4)
/ file = "session2_4.iqx"
</batch>


// session3_batch.iqx
<batch>
/ groups = (1 of 4)
/ file = "session3_1.iqx"
</batch>

<batch>
/ groups = (2 of 4)
/ file = "session3_2.iqx"
</batch>

<batch>
/ groups = (3 of 4)
/ file = "session3_3.iqx"
</batch>

<batch>
/ groups = (4 of 4)
/ file = "session3_4.iqx"
</batch>

By n.lee.20 - 10/25/2021

That works perfectly, thank you very much!

A few follow up questions. If I want to keep the groupID consistent for each participant across each session is the easiest way to do this by queryparameter?

Secondly, can I also use queryparameters for sessionID to ensure that participants are in the correct session? If so how would this look when combined with the groupID queryparameter? Or is there a way in inquisit to only log it as a session if they reach the end?

Many thanks!
By Dave - 10/25/2021

n.lee.20 - 10/25/2021
That works perfectly, thank you very much!

A few follow up questions. If I want to keep the groupID consistent for each participant across each session is the easiest way to do this by queryparameter?

Secondly, can I also use queryparameters for sessionID to ensure that participants are in the correct session? If so how would this look when combined with the groupID queryparameter? Or is there a way in inquisit to only log it as a session if they reach the end?

Many thanks!

> If I want to keep the groupID consistent for each participant across each session is the easiest way to do this by queryparameter?

Yes.

> Secondly, can I also use queryparameters for sessionID to ensure that participants are in the correct session?

No. The server keeps track of session ID, it cannot be set per query parameter. In essence, whenever the server sees the same subject ID launching the given experiment at different time points, it will automatically increase session ID by one. If a participant somehow misses a session (e.g. by refreshing the launch page multiple times), a specific session number can be launched via the player app:


By n.lee.20 - 10/27/2021

Thanks Dave. Sorry I'm not familiar with the player app. Is that something the participant is able to use themselves? If so how can I instruct participants to use this please? 

Thank you!
By Dave - 10/27/2021

n.lee.20 - 10/27/2021
Thanks Dave. Sorry I'm not familiar with the player app. Is that something the participant is able to use themselves? If so how can I instruct participants to use this please? 

Thank you!

The Inquisit Player app is the program every participant has to download and install before they can launch a given Inquisit Web experiment. If you have ever tried out any Inquisit 6 Web experiment, you have the player app installed on your device. Start it and navigate to its "Tests" tab. There you will see the history of previously launched web experiments as depicted in the screenshot in my previous response.
By n.lee.20 - 11/4/2021

Great, thank you very much!