Group: Administrators
Posts: 1.3K,
Visits: 1K

Inquisit allows you to perform betweensubject 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"
<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 betweensubject manipulations. If you are using Microsoft Excel, the formula is "=MOD(A21, 4) +1" where A2 is the cell that has the subject or group id.

Group: Forum Members
Posts: 1,
Visits: 5

+xJust want to check: the 4 in the Excel formula: "=MOD(A21, 4) +1" represents 4 groups, is that correct? The example used 2 groups but the Excel formula represents 4 groups, so I wanted to make sure. Thanks, Holly Inquisit allows you to perform betweensubject 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"
<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 betweensubject manipulations. If you are using Microsoft Excel, the formula is "=MOD(A21, 4) +1" where A2 is the cell that has the subject or group id.

Group: Administrators
Posts: 10K,
Visits: 60K

+x+xJust want to check: the 4 in the Excel formula: "=MOD(A21, 4) +1" represents 4 groups, is that correct? The example used 2 groups but the Excel formula represents 4 groups, so I wanted to make sure. Thanks, Holly Inquisit allows you to perform betweensubject 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"
<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 betweensubject manipulations. If you are using Microsoft Excel, the formula is "=MOD(A21, 4) +1" where A2 is the cell that has the subject or group id. Yes, that is correct. The modulus ought to be equal to the number of groups / conditions you had. In other words: If you had two conditions, you'd calculate groupnumber modulo 2, if you had three conditions, you'd calculate the groupnumber modulo 3, if you had four conditions, you'd calculate the groupnumber modulo 4, and so forth.
