Creating Blocks

Next we'll define the different kinds of blocks of trials used in the IAT. Blocks
represent sequences of trials that can be in random or predetermined order. For
this experiment, 11 block elements will be defined, 7 for practice at the IAT task,
2 for IAT data collection, and 2 for presenting task instructions.

First, let's define the practice block element for classification of the attribute
categories, good and bad.

This block element is named "attributepractice". The trials attribute specifies
that the block runs 1 instruction trial followed by 20 trials randomly selected
without replacement from the two trial types "attributeA" and "attributeB", which
present good and bad words respectively. The selection algorithm guarantees that
both trial types will be run 10 time each. The bgstim attribute specifies
that the "attributeA" and "attributeB" category labels are presented on the screen
as background stimuli to remind participants how the response keys map to the categories.
The errormessage attribute presents the stimulus named "error" (our big red
X) for 200 ms whenever subjects respond incorrectly. The responsemode
for the block is set to correct, which means participants must give the correct
response to advance to the next trial, even if their initial resposne was incorrect.
Finally, recorddata is set to false so that our data file isn't cluttered
up with practice data from this block.

The rest of the blocks have a similar pattern. Next, lets define the practice blocks
used for target categories. There are two such blocks for the two possible key assignments.
Here is the practice block on which insects are classified with the right key and
flowers with the left:

Next, lets define the practice blocks used after the key assignments for the target
categories are switched. First, we'll define the block on which insects are classified
with the left key and flowers with the right:

Notice that there are 40 practice trials in these blocks rather than 20. The extra
trials are included to help subjects unlearn the key assignments from the previous
blocks.

We've defined two blocks for the initial key assignment, and two more blocks or
the key assignment after the switch. Since each subject can only have one initial
assignment and one switched assignment, each subject will only encounter one of
them depending on which key assignment condition they are assigned to.

The practice blocks above handle single category judgements, so we still need to
define the practice for the mixed judgment blocks in which participants have to
classify both attribute and target stimuli:

These are similar to previous practice blocks. One notable difference is that the
bgstim attribute presents both target and attribute labels. Another
difference is how the sequence of trials are defined. On odd numbered trials (excluding
the instructions trial), the block runs a randomly selected target classification
trial. On even numbered trials, a randomly selected attribute trial is run. This
ensures that the participant does not encounter a run of trials in which they are
making only flower/insect judgments or only bad/good judgments.

That does it for practice blocks. Lets define the test blocks. There are two such
blocks, one using a "compatible" (i.e., stereotype consistent) pairing of target
and attribute categories, and the other using the incompatible pairing:

These blocks differ from the practice blocks in that they run 40 trials rather than
20, they do not have recorddata set to false, and they include no instruction
trials. Instructions are instead displayed in a special instructions block. The
reason for presenting the instruction trial in a separate block is because our summary
page that we created earlier reports the average response latency score for the
entire test block. If the test block included an instruction trial, the latency
on this trial would also be included in the average. Since we want to report the
average latency for test trials only and not instruction trials, we pulled the instruction
trial out of the test block and put it into its own instruction block. The instruction
blocks are defined below: