Sunday, May 9, 2010

The Stroop Test

The Stroop Test is a classic phenomena showing the importance of attentional filtering and interference.  I wanted to implement a version in PEBL for the PEBL Test battery. The basic setup is this: It is easy to name colors.  It is easy to read colors.  But what about naming the color or reading the name of colored words (when they are inconsistent).  One would expect these to be harder, but are they?

When most people see the Stroop effect, it is shown when they have to read something like the following:
Blue Purple Red
Green Purple Green

Blue Red Brown
Purple Green Green

Orange Purple Red
Green Purple Green



This is a bit difficult, but the fact that it is difficult is not the Stroop effect.  The stroop effect is the fact that naming the colors is REALLY difficult.  Try it.  The typical explanation is that you are processing two streams of information, one which is fast and automatized (reading) and one which is slower (color naming).  When there is an incompatibility between the two dimensions, you see little slowing for reading because the color information is slower, and can be ignored. When you have to do color naming, the fast automated reading cannot be ignored (unless you squint or take off your glasses), and so it becomes really difficult.

So, I wanted to have an automated computer version of the Stroop test, but the big problem I have is how do I measure performance?  Traditionally, you look at time to read a list or name colors from a list, and either monitor the subject for accuracy or trust them to be be honest.  So I elected to use keyboard input to select the response.  This adds a new wrinkle to the task, which may end up revealing interesting things about attentional filtering.

Here is the complexity: First, there are basically two perceptual dimensions: words and colors, each with their appropriate identification process (reading and color naming).  But to have all the right comparisons and control conditions, you might want to:

- present color names in black text (only possible for reading task)
- present color names in consistent color (for either naming or reading)
- present color names in inconsistent color (for either naming or reading)
- present block of color (only possible for color naming task)


But now, what are the responses?  Instead of vocal production, I need a set of options to choose between. To do this, I want to put labels on the screen for the participants to refer to.

These could be something like:


red green blue yellow
 or

red green blue yellow

 or
XXXX XXXX XXXX XXXX

You could also have inconsistent mappings, but that gets really messy.  Presumably, if you learn the mappings really well, you don't need labels at all, but I don't want to distribute a test where you can't tell what the responses are.  If these are on a screen, then presumably the subject can, in some conditions, do some type of visual matching, and so solve the task at a very peripheral level.  For other conditions, this would not be possible.

So it all gets somewhat complex, because I have essentially decided to do all of these.  The test will be divided into blocks, and the blocks will be arranged as follows:

Practice.  Color-name consistent responses and stimuli.
0.  word-color consistent stimuli, word-color consistent response labels.  In this case, everything is redundant, so you are identify either/both name and color.

Test Set A: color-name consistent responses

1. Identify word name.  responses are color-name consistent, but stimili are a mix of  consistent, inconsistent, and black color names.
2. Identify color name.  Responses are color-name consistent. stimuli are a mix of consistent, inconsistent, and colored 'xxxxxx' stimuli.

Test Set B: black color-name responses
3. Identify word name.  response labels are black color names.  Stimuli are a mix of consistent, inconsistent, and black colored color-names.
4. Identify color name.  Response labels are black color names. stimuli are a mix of consistent, inconsistent, and colored 'xxxxxx' stimuli.

Test set B, Colored block responses
5. Identify word name. Response labels are colored rectangles.  stimuli are a mix of consistent, inconsistent, and black color names.

6. Identify color.  Response labels are colored rectangles.  Stimuli are a mix of consistent, inconsistent, and colored "xxxxx" stimuli.



Here is a video of PEBL Stroop in action. This version was truncated to have just 4 trials/condition so it would all fit in a short video.  The full version can have 20 trials per condition.





So, the design is  pretty complex, but there is a payoff.   I won't go through the details of programming the test, but rather focus on the output and analysis.  First, the software prints out a detailed key to help understand the different conditions:


--------------------------------------------------------
 Report for PEBL Stroop Test, Version 0.2
 http://pebl.sf.net
 (c) 2009 Shane T. Mueller, Ph.D.
 PEBL Version 0.10
 Sat Jan 30 16:57:03 2010
 Participant Code: 0
--------------------------------------------------------
 This experiment tested interference effects
   between different types of information: color and word. 

   Stimuli were colored words.  Stimulus color could be in red, green,
   blue, yellow, or black (non-target color).  Stimulus words could be
   'red', 'green', 'blue', 'yellow', or 'xxxx'.  Response labels could
   be 'red', 'green', 'blue', 'yellow' in consistent colors or in
   black, or could be color patches with no text.


   In these  blocks, 'mixed' stimuli refer to blocks where the stimuli varied in
   both color and identity, but these mapping were not consistent with
   one another.  The blocks included, in order:

   Blocks 0-2 each had stimuli labels that were consistent (color and
   label name coincided)

   0. A color-word consistent block, with color-word consistent
   response labels. This was practice.

   1. A word-naming block, with color-inconsistent stimuli and
   color-consistent response labels.
   2. A color- ID block, with inconsistent stimuli and consistent
   response labels.

   Blocks 3-4 had response labels that were all in black.
   3. A word-naming block, with inconsistent stimuli and response
   labels in black.
   4. A color identification task of inconsistentt stimul, response
   labels in black.
  
   Block 5-6 had response labels that were just colored rectangles

   5. A word-naming block with inconsisntent stimuli and response
   labels as color patches.
   6. A color - ID block with inconsisntent stimuli and response
   labels as color patches.
Description of stimulus conditions:
     1. color name and color match. (consistent)
     2. color name does not match color. (conflict)
     3. color name normal; color is black (single-feature)
     4. color name is 'xxxxx'; color is normal (single-feature)

Next is a set of tables for each pair of blocks.  This allows us to compare each response condition within itself. Note that the RTs here are computed by finding exp(mean(log(rt)).  This is handy because it will do a good job of pulling in a long tail caused by lapses or other outliers, but for real research purposes you should probably analyze the data and remove outliers.


This first output set shows colored names.   Lets look at the first row. For stimuli that were consistent color-name, reading was slower than color naming. Huh?  This  seems to fly in the face of the explanation of the stroop effect I gave above, where reading should be easier than color naming.  But consider this: the color appears on the screen, and so you can rely on perceptual matching, which makes it easier.  Will the order of the stroop interference also reverse?  The second row shows this.  For conflicting stimuli, it was much easier to name the color than to read the word. The 'cost' of interference is shown on the bottom of the table: reading has a cost of nearly 200 ms, whereas color naming only 43 ms, a different of 150 ms!  You may be able to attribute this being able to match colors through the periphery of the eye, without needing to make eye movements.  Single feature was a black name in the name condition, and a colored xxxxx in the color condition.  These were each slightly slower than the consistent condition, showing a facilitation of 68 and 3 ms, respectively.


-----------------------------------
     Condition   Name   Color  (N-C)
-----------------------------------
    Consistent  546     494    51
      Conflict  803     540    262
Single Feature  614     497    116
  Facilitation  68    3     65
          Cost  -189    -43     -146
-----------------------------------


Similar analysis can be done for the black response labels. Here, reading and color naming take just about the same time. I know from experience though that this can be variable, especially depending on practice and fatigue.  Many times color will take a lot longer here.  But this is just one observation, so I wouldn't make too much of it.  I'm not sure why the single-feature condition was the fastest here, but maybe it was just sort of noise.



Responses: Black Names (Block 3-4)
-----------------------------------
     Condition   Name   Color  (N-C)
-----------------------------------
    Consistent  691     696    -6
      Conflict  665     804    -139
Single Feature  598     539    59
  Facilitation  -93    -158     64
          Cost  -68    -265     197
-----------------------------------

What about the response labels that are just color patches?  It looks a lot like the FIRST condition, with color faster than naming this time.  It looks like in the first colored label condition, I was ignoring the text and sort of matching the color.

Responses: Colored Patches (Block 5-6)
-----------------------------------
     Condition   Name   Color  (N-C)
-----------------------------------
    Consistent  578     495    83
      Conflict  816     548    267
Single Feature  638     493    145
  Facilitation  60    -2     62
          Cost  -178    -55     -123
-----------------------------------

Here is a figure that summarizes the mean RTs in each condition.  Notice how the first and third conditions look very similar, with interference costs for word ID.  The second looks more like the 'traditional' stroop effect, with costs for color naming.


There is a lot more data output by the stroop test, like accuracy and detail for each block. So try it out by downloading PEBL (the stroop test is included in the test battery) and see if you get the same costs/facilitations as I did.

3 comments:

BillC said...

Dr. Mueller:

I'm trying to modify the stroop, using only the shade identifying block with lists of words. I'm having trouble modifying the program. Could you help me?

Shane Mueller said...

First, make sure you download the latest version of PEBL and the test battery. You are looking for just blocks 3-4. You can _basically_ comment out (and eventually delete) the text (using # signs at the beginning of lines) that run blocks 1-2 and 5-6. This is around line 157-211 and 284-311. There is also some reporting/calculating at the end of the test as well, which you need to comment out so it won't crash when it can't find the proper data. These are pretty well labeled, so it should be easy to see what to cut out.

If you have trouble, look at the stderr.txt file/window which will give you clues about where in the file PEBL fails. Post here or email the pebl-list with details.

E. Kasper said...

Dr. Mueller,

I want to modify the stroop, using German Words for colors (rot instead of red, blau instead of blue, gruen instead of green, gelb instead of yellow). I don`t find an option for change the gcolors. Could you help me?

Regards E. Kasper