Creating Text Stimuli

The first step in building an experiment is to define all of the stimuli. Stimuli include text or pictures to be shown on a given trial, background text that remains on the screen throughout a block of trials, or a feedback text shown to the subject to indicate when to respond and whether their response was correct or incorrect.

First, let's define the pleasant words:

<text pleasant>
/ items = pleasant
</text>

This text element defines a set of text stimuli named "pleasant" that has one attribute, items. The items attribute indicates where the text items are defined. In this case, they are defined in an item element named "pleasant" somewhere else in the script (more on this below). There are a number of other attributes that could be specified for our text stimulus, including attributes for controling the color, background color, screen position, and font. However, we'll just use the defaults of black text on a white background presented in the middle of the screen.

Now, lets define the items for this text element:

<item pleasant>
/ 1 = "        HONOR        "
/ 2 = "        LUCKY        "
/ 3 = "       DIAMOND       "
/ 4 = "        LOYAL        "
/ 5 = "       FREEDOM       "
/ 6 = "       RAINBOW       "
/ 7 = "         LOVE        "
/ 8 = "        HONEST       "
/ 9 = "        PEACE        "
/10 = "        HEAVEN       "
</item>

This item element is named "pleasant", which matches the name specified in the items attribute of the text element above. The item set consists of ten pleasant words. Note that the words are padded with spaces so that they are all of equal length when presented in a fixed width font.

Now, lets define the rest of the stimulus categories. First, we'll define the unpleasant words:

<text unpleasant>  
/ items = unpleasant
</text>

and the unpleasant items.

<item unpleasant>
/ 1 = "         EVIL        "
/ 2 = "        CANCER       "
/ 3 = "       SICKNESS      "
/ 4 = "       DISASTER      "
/ 5 = "       POVERTY       "
/ 6 = "        VOMIT        "
/ 7 = "         BOMB        "
/ 8 = "        ROTTEN       "
/ 9 = "        ABUSE        "
/10 = "        MURDER       "
</item>

Next, we'll define the flowers:

<text flower>  
/ items = flowers
</text>
and the flower items.
<item flowers>
/ 1 = "        ROSE         "
/ 2 = "       BEGONIA       "
/ 3 = "       VIOLET        "
/ 4 = "        DAISY        "
/ 5 = "      GERANIUM       "
/ 6 = "        TULIP        "
/ 7 = "      CARNATION      "
/ 8 = "      DAFFODIL       "
/ 9 = "        LILAC        "
/ 10=  "        PANSY        "
</item>

Finally, we'll define the insects:

<text insect>  
/ items = insects
</text>
and insect items.
<item insects>
/ 1 = "         ANT         "
/ 2 = "       LOCUST        "
/ 3 = "         BEE         "
/ 4 = "       HORNET        "
/ 5 = "        WASP         "
/ 6 = "       SPIDER        "
/ 7 = "      CENTIPEDE      "
/ 8 = "      COCKROACH      "
/ 9 = "       BEDBUG        "
/ 10= "       LADYBUG       "
</item>

When creating an IAT, it's a good idea to include instruction text that reminds participants how to respond to the various stimulus categories. We can do this by presenting text on the screen that are shown in the background throughout a block of trials. So, let's create the instruction text stimuli that remind the subject to press the "a' key for unpleasant and the "5' key for pleasant.

<text pleasantreminder>  
/ items = ("Press 'a' for pleasant")
/ position = (75, 25)
/ txcolor = (0, 0, 255)
</text>

The reminder stimulus is a bit different than the previous stimuli. First, rather than defining the items in a separate element, we've simply listed the single item directly in the attribute. This inline syntax is a convenient way to define small item sets for things like instrutions, focus stimuli, and masks. Also, the position attribute specifies that the text should be displayed on the upper right of the screen rather than in the default center position. Specifically, the stimulus is positioned 75% of way across the screen (from left to right), and 25% percent of the way down the screen (from top to bottom). Finally,the txcolor attribute specifies that the text should be blue rather than the default color black. Colors in Inquisit are specified as a mix of red, green, and blue components; the txcolor attribute specifies 0 intensity for red and green components, and the maximum intensity 255 for the blue component, producing a nice blue color.

Now, lets define the unpleasant reminder, which will be displayed in the upper left quadrant of the screen.

<text unpleasantreminder>  
/ items = ("Press '5' for unpleasant")
/ position = (25, 25)
/ txcolor = (0, 0, 255)
</text>

and the rest of the reminders:

<text flowerleft>  
/ items = ("Press 'a' for flowers")
/ position = (25, 25)
/ txcolor = (0, 0, 255)
</text>
<text flowerright>  
/ items = ("Press '5' for flowers")
/ position = (75, 25)
/ txcolor = (0, 0, 255)
</text>
<text insectleft>  
/ items = ("Press 'a' for insects")
/ position = (25, 25)
/ txcolor = (0, 0, 255)
</text>
<text insectright>  
/ items = ("Press '5' for insects")
/ position = (75, 25)
/ txcolor = (0, 0, 255)
</text>
<text pleasant_flower>  
/ items = ("Press '5' for pleasant or flowers")
/ position = (75, 25)
/ txcolor = (0, 0, 255)
</text>
<text pleasant_insect>  
/ items = ("Press '5' for pleasant or insects")
/ position = (75, 25)
/ txcolor = (0, 0, 255)
</text>
<text unpleasant_flower>  
/ items = ("Press 'a' for unpleasant or flower")
/ position = (25, 25)
/ txcolor = (0, 0, 255)
</text>
<text unpleasant_insect>  
/ items = ("Press 'a' for unpleasant or insect")
/ position = (25, 25)
/ txcolor = (0, 0, 255)
</text>

Finally, lets define an error message stimulus to show subjects whenever they incorrectly classify a target stimulus:

<text errormessage>  
/ items = ("        ERROR        ")
/ txcolor = (255, 0, 0)
</text>

The "errormessage" text element uses the txcolor attribute to set the red component to 255 and the green and blue components to 0, producing a rich red color.


Previous Overview Creating Instructions Next