The Implicit Association Test (IAT) is a measure of implicit cognition, see the original paper here:
Greenwald, A. G., McGhee, D. E., & Schwartz, J. L. (1998). Measuring individual differences in implicit cognition: the implicit association test. Journal of personality and social psychology, 74(6), 1464.
Following Nosek, B. A., Greenwald, A. G., & Banaji, M. R. (2005), the assignment to one of the two different trial orders is randomized and the fifth block always contains 40 instead of 20 trials.
Greenwald, A. G., Nosek, B. A., & Banaji, M. R. (2003) discuss an improved scoring algorithm. I will implement this when I can find some spare time.
This code implements the IAT in a clean and modular fashion. More specifically, it is a self-other variant of the IAT. The stimuli words are from Greenwald, A. G., & Farnham, S. D. (2000).
However, you can configure it to match your specific IAT type by changing the stimuli.csv file and the variables allRes (line 31) and pos, neg, self, other (line 36). In the main function, you can add your specific instructions beneath each block.
helpers.py contains functions that are experiment agnostic and can be used generically. Some tweaking may be required. You can get only the helpers.py with
curl -O https://raw.github.com/dostodabsi/implicit-association-test/master/helpers.py
The guys at gureckislab try to establish a platform where browser-based experiments can be shared among researchers. In the spirit of open science, I'd love to see a similar platform emerge for desktop experiments written in Python / PsychoPy. If you have any ideas, please drop me an email at [email protected] or contact me over Twitter at @fdabl
You are welcome to use this code for personal or academic uses. If you fork, or use this in an academic paper please cite as follows:
Dablander, F. (2014). Implicit Association Test in Python (Version 1.00)[Software]. Available from https://github.com/dostodabsi/implicit-association-test. doi:10.5281/zenodo.10603
The code was originally written for the bachelor thesis of my dear colleague Gabriela Hofer (@gabriela_hofer). She read up on the whole literature and gave me detailed instructions on the IAT.