## 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 posted 9 Years Ago ANSWER         Group: Administrators Posts: 1.3K, Visits: 5.6K Inquisit allows you to perform between-subject manipulations at the or level using the / subjects attribute. For example, the following varies the order of the script based on groupid:/ subjects = (1 of 2)/ groupassignment = groupnumber/file="foo.iqx"/file="bar.iqx"/ subjects = (2 of 2)/ groupassignment = groupnumber/file="bar.iqx"/file="foo.iqx"When the experiment runs, Inquisit assigns a participant to one or the other 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 that group id value corresponds to? This can be determined with the following formula:group = ((groupid - 1) % groupcount) + 1where 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) + 1which 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 9 Years Ago by seandr hollysully          Group: Forum Members Posts: 1, Visits: 5 +xseandr - Friday, July 25, 2014Just want to check:  the 4 in the Excel formula:  "=MOD(A2-1, 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, HollyInquisit allows you to perform between-subject manipulations at the or level using the / subjects attribute. For example, the following varies the order of the script based on groupid:/ subjects = (1 of 2)/ groupassignment = groupnumber/file="foo.iqx"/file="bar.iqx"/ subjects = (2 of 2)/ groupassignment = groupnumber/file="bar.iqx"/file="foo.iqx"When the experiment runs, Inquisit assigns a participant to one or the other 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 that group id value corresponds to? This can be determined with the following formula:group = ((groupid - 1) % groupcount) + 1where 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) + 1which 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. Dave posted 6 Years Ago ANSWER         Group: Administrators Posts: 12K, Visits: 95K +xhollysully - Thursday, August 31, 2017+xseandr - Friday, July 25, 2014Just want to check:  the 4 in the Excel formula:  "=MOD(A2-1, 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, HollyInquisit allows you to perform between-subject manipulations at the or level using the / subjects attribute. For example, the following varies the order of the script based on groupid:/ subjects = (1 of 2)/ groupassignment = groupnumber/file="foo.iqx"/file="bar.iqx"/ subjects = (2 of 2)/ groupassignment = groupnumber/file="bar.iqx"/file="foo.iqx"When the experiment runs, Inquisit assigns a participant to one or the other 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 that group id value corresponds to? This can be determined with the following formula:group = ((groupid - 1) % groupcount) + 1where 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) + 1which 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.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.

#### Merge Selected

Merge into selected topic...

Merge into merge target...

Merge into a specific topic ID...