How to determine which batch or expt was run based on subject id or group id


How to determine which batch or expt was run based on subject id or...
Author
Message
seandr
seandr
Supreme Being (143K reputation)Supreme Being (143K reputation)Supreme Being (143K reputation)Supreme Being (143K reputation)Supreme Being (143K reputation)Supreme Being (143K reputation)Supreme Being (143K reputation)Supreme Being (143K reputation)Supreme Being (143K reputation)
Group: Administrators
Posts: 1.3K, Visits: 5.6K
Inquisit allows you to perform between-subject manipulations at the <batch> or <expt> level using the / subjects attribute. For example, the following varies the order of the script based on groupid:

<batch>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
/file="foo.iqx"
/file="bar.iqx"
</batch>

<batch>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
/file="bar.iqx"
/file="foo.iqx"
</batch>

When the experiment runs, Inquisit assigns a participant to one or the other <batch> based on the group id, which, depending on configuration, could be a randomly or sequentially generated number, or something entered by the researcher or the participant. Let's say the group id was a randomly generated value of 18843245. How do you determine which <batch> that group id value corresponds to? 

This can be determined with the following formula:

group = ((groupid - 1) % groupcount) + 1

where groupcount is the total number of groups (2 in the above example) and % represents the modulus operator, which returns the remainder after the numerator is divided by the denominator. If we plug the values from our example into the formula, we get:

group = ((18843245 - 1) % 2) + 1

which is equal to 1. In other words, this particular participant ran group 1, where foo.iqx was administered first and bar.iqx was administered second. If /groupassigment = subjectnumber or is unassigned, we would use the same formula but plug in the subject id rather than the group id. 

When analyzing your data, you'll want to calculate a group variable using this formula in order to test or control for order effects or other between-subject manipulations. If you are using Microsoft Excel, the formula is "=MOD(A2-1, 4) +1" where A2 is the cell that has the subject or group id.

Edited 10 Years Ago by seandr
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search