OpenSourceIRAP
Implicit Relational Assessment Procedure (IRAP) - no longer maintained
Install / Use
/learn @ianhussey/OpenSourceIRAPREADME
![]()
Open Source IRAP
Implicit Relational Assessment Procedure
<div style="page-break-after: always;"></div>[TOC]
License
Copyright (c) Ian Hussey 2015 (ian.hussey@ugent.be)
Released under the GPLv3+ open source license.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Version
0.9.11
NB This code is still in beta - it hasn't been used it in a published article yet.
Description & purpose
The Implicit Relational Assessment Procedure (IRAP: Barnes-Holmes et al., 2010) was designed by Relational Frame Theory researchers to capture the relative strength of relational responding, but it has frequently been used as a measure of implicit attitudes more generally. See Vahey et al., 2015 for a meta analysis of clinically relevant IRAP studies. This implementation is designed for use by experimental and experimental-clincial psychologists.
This implementation of the IRAP has very high fidelity to the procedure described in Barnes-Holmes et al. (2010: a sketch of the IRAP and REC model), and to other implementations of the IRAP (e.g., the IRAP "2010" and variants, written in Visual Basic 6). Most task parameters are soft coded and can be changed via the task.xlsx file (see task parameters section below).

- Each trial presents a "label" stimulus at the top of the screen, a "target" stimulus in the middle of the screen, and two response option labels at the bottom left and right of the screen.
- There are two label stimuli categories and two target stimuli categories, which when combined create four "trial types".
- Incorrect responses result in a red X being presented on screen. Progression to the next trial is contingent on a correct response.

- Inter trial interval is set to 400 ms.
- Participants complete pairs of blocks of trials in which the response contingencies alternate (e.g., flowers-positive-similar vs. flowers-positive-different).
- Each block is preceded by a customisable responding rule (Rule A and Rule B, e.g., "Respond AS IF flowers are positive and insects are negative").

- Each block is also followed by feedback about the median latency and % accuracy in the block.

- Participant complete practice block pairs (e.g., max 4) until they meet mastery criteria on both blocks in a pair (e.g., median latency <= 2000ms and accuracy >= 80%), and then a fixed number of test block pairs (e.g., 3). If mastery criteria are not bet within the max the task skips the test blocks and goes to the end screen.
- Typically, reaction time differences between the two block then are quantified (e.g., using the D1 effect size score, below) in order to produce a measure of "implicit attitudes" (although see De Houwer, 2006).
Requirements
- PsychoPy v1.85.3
- A free and open source program for delivering psychology experiments written in Python. See here for documentation.
- PsychoPy runs locally on Windows, Mac, and Linux. It's not possible to run PsychoPy scripts online.
- You might be able to use more recent versions, but will probably need to run the
Open Source IRAP.pyfile rather than theOpen Source IRAP.psyexpfile.
- RStudio v1.0.136+, a very user friendly interface for R that integrates Knitr and RMarkdown documents, which are used by the processing script.
Usage
1. Running
You can run either the Open Source IRAP.psyexp file or the Open Source IRAP.py file inside PsychoPy. The Open Source IRAP.py file should have greater cross platform support; if you run into errors with the Open Source IRAP.psyexp file use Open Source IRAP.py instead.
- If you're using a newer version of PsychoPy, the
Open Source IRAP.psyexpwill not run. Use theOpen Source IRAP.pyinstead. - The left response is the "e" key, and the right response is the "i" key.
- The return key ends the task properly once you reach the end of "task screen".
- The escape key quits the task at any time.
If you run the Open Source IRAP.psyexp file, a Open Source IRAP_lastrun.py will be created. This can be ignored.
If you run the Open Source IRAP.py file, a Open Source IRAP.pyc file will be created. This can also be ignored.
2. Delivery
In order to minimise attrition rates (e.g., <c.10%), the majority of published IRAP work has been delivered one-to-one by a trained researcher. Additionally, many published studies have employed some form of standardised experimenter script. See the experimenter script folder.
3. Localisation and customisation
All stimuli and instructions within the task are set via the stimuli.xlsx and task.xlsx files.
PsychoPy has Unicode support, so translating the task into other languages (Spanish, Polish, Japanese, etc.) only requires changes to these excel files.
- NB a poorly documented bug is that if you zip and unzip excel files using archive utility on Mac OS X, Unicode characters are no longer correctly displayed and will throw an ASCII error in PsychoPy. Make new excel files to correct the issue.
4. Stimuli
Label and target stimuli can be either text or image stimuli. The default stimulus.xslx file employs text stimuli for both labels and targets. The alternative file in the alternative stimuli files>picture and word stimuli folder file employs images as labels and text stimuli as targets. Simply move these file to the same folder as the Open Source IRAP.psyexp/Open Source IRAP.py to run. Although, you can mix and match as you like; you can even make some rows text stimuli and some rows image stimuli.
The file that will be used is that which is placed in the same folder as the Open Source IRAP.psyexp/Open Source IRAP.py that is run. All image stimuli should be placed in the same folder. Remember to reduce your image files to as small as possible so as to minimise load and rendering time.
If using text stimuli, put blank.png in the image columns (e.g., labelB_image_stimuli) and the text stimuli in text stimuli column (e.g., labelB_stimuli). The task presents images on every trial either way; this sets it to present a black square that is effectively invisible. As such, the blank.png file must always be left in the same folder as the Open Source IRAP.psyexp/Open Source IRAP.py files.
If using image stimuli, put a single space character (i.e., ) in the text stimuli column and the name of the image file (including extension) in the image stimuli column. Failure to do either this or the above step will cause PsychoPy to throw an error message.
You can employ an arbitrary number of stimulus exemplars per category, but all columns in the excel stimulus file must have the same number of rows (i.e., exemplars). The number of trials per block is a function of the number of exemplars (see task parameters below).
The response options (i.e., "similar" and "different") are specified in the task.xlsx file.
- NB response option "A" will be presented on the right hand side in the first block (assuming block order = "a" and moving response options = False). Here, I have followed practices from the IAT literature to map the most probable response (e.g., similar is "default" over different, true over false, etc) to the right hand, which is more likely to be the dominant hand. This may differ in other implimentations of the task.
The pre block rules are also specified in the task.xlsx file. These can be generic for both blocks (e.g., "learn to respond correctly based on the feedback") or specific to each and the stimulus set (e.g., "respond AS IF flowers are positive and insects are negative").
- NB insert return characters/line breaks inside excel files using alt-⏎ (Windows) / ⌃⌥⏎ (Mac). This can be useful for instructions.
5. Task parameters
The number of trials per block is equal to (the number of rows in the stimuli.xlsx file) * (4 [the number of trial types]).
- For example, IRAPs frequently employ four exemplars per stimulus category, and 32 trials per block. The default stimulus file accomplishes this by including the four exemplars twice each (on separate rows) in the
stimuli.xlsxfile. 8 rows(4 exemplars *2 rows each)*4(trial types) = 32 trials per block.
Each block contains an equal number of each trial type. This is determined by the block_layout.xlsx file, which specifies how label and target stimuli are combined to make trial types. This file should not be altered.
The task.xlsx file also specifies:
stimulus_file, a variable for specifying where the task should look for its stimuli. The default isstimuli.xlsx.- practice block mastery accuracy criterion
- This is specified out of 100% (e.g., 80), not 1 (e.g., .8)
- practice block median latency criteria
- This is specified in seconds, not milliseconds.
- maximum number of practice block pairs
- number of test block pairs
- location of the response options (left vs. right)
- Response options locations can be either fixed or moving randomly. Default is "False" (fixed), set this to "True" for moving.
-
the screen location of all stimuli
